Tag Archives: powershell

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:

http://pastebin.com/rgGfYihY

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

http://pastebin.com/39X5ma

JV

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.