Messing about with IT

Category: Windows

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

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()

Using WMI filters with Group Policy

Sometimes you need to apply a group policy to an OU but prevent that same policy from applying to certain machines in the OU. Rather than creating child OUs, you could use a WMI filter. Note however that there are performance penalties…

Group Policy OUs

For instance, you might need to apply a group policy which installs the 64 bit version of the Windows Management Framework to the PCs OU. This will be fine for most PCs in that OU, but maybe there are some older 32 bit Windows 7 PCs in the OU which would cause the 64 bit installer to fail.

Continue reading

Windows 10 slow to boot and devices fail to start

On a new laptop running Windows 10, 1809, I experienced an issue that caused the boot time to increase to over 5 minutes. After the boot process eventually finished, many devices were not working correctly.

For example, I found:

  • no Wi-Fi networks showing in the list before logging on
  • the fingerprint scanner is not working
  • after logging in, you can’t enter any text in the search bar or Windows app store apps
Continue reading

Reset VSS writers

Sometimes a VSS writer stops working and this can usually be seen in the logs of a failed backup job.

You can check which VSS writer is in a failed state by running the command vssadmin list writers

Continue reading

© 2024 Tech Explorer

Theme by Anders NorénUp ↑