Here’s a PowerShell script that can be used to scan for Windows updates, install them and optionally restart the system automatically. I’ve been using this for a few years now on Windows Server 2008 R2 and above without issues.Continue reading
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
Here’s a PowerShell script for a function to send email with optional attachments. It accepts a comma-separated list of attachments, or no attachments at all.
You can include this in other PowerShell scripts to make this function available, rather than having the email sending functionality repeated in multiple scripts.Continue reading