Tech Explorer

Messing about with IT

PowerShell script to check the status and start the Microsoft SMTP virtual server

For a time, I had a server with an issue where the IIS SMTP virtual server stopped due to an error. My usual automatic checks for stopped Windows services didn’t pick this up because the Windows service continued to run, even though the SMTP virtual server had stopped.

This caused some internal emails to be delayed. It was easy enough to start the virtual server again, but better to put a script in place to check the status and start the SMTP virtual server if necessary.

Continue reading

Merge files using JavaScript within Photoshop

You can use JavaScript within Photoshop to automate almost any process. In this example, we’ll use it to open a specific file in a batch workflow (action).

For this quick example, we have 2 folders of image files; 1 folder containing background images and another folder containing text layers. Each set of files follows the same naming convention as follows:

Continue reading

Set the computer description remotely using PowerShell

Here’s a quick PowerShell script which allows you to set the computer description remotely.

You’ll need to run this in a PowerShell window with administrative rights for the remote PC.

$RemotePC = Read-Host -Prompt 'Input the remote computer name e.g. PC0123'
$RemoteDescription = Read-Host -Prompt 'Input the new description for the remote computer'

$PC = Get-WmiObject -class Win32_OperatingSystem -computername $RemotePC
$PC.Description = $RemoteDescription

$PC.Put()
« Older posts

© 2024 Tech Explorer

Theme by Anders NorénUp ↑