Tag Archives: powershell

Notify on expiring passwords (AD) powershell script

This script will alert all users who are about to have their AD password expired via email.

Note: each user must have their emails in the “email address” property in Active Directory.





Downed IIS Websites and Application Pools Reports

As it seems one of the DEV guys disabled one of our production Applications…and forgot to bring it back up. The result: Some not too happy customers didnt receive their reports on time.

The following script will report back via email Application Pools that have been stopped:


The following script will report back via email Websites that have been disabled:



Upgrade your Powershell Scripts – Run Once (after a reboot)

2 lines that forever changed my powershell capabilities by being able to run commands and scripts immediately after a reboot+logon:

set-location HKLM:\Software\Microsoft\Windows\CurrentVersion\RunOnce

new-itemproperty . MyKey -propertytype String -value “ENTER YOUR COMMAND HERE I.E POWERSHELL -FILE C:\PATH\SCRIPT.PS1”

The newly created registry key will be auto-deleted the next time you reboot and logon.