Check IIS Health (Services, Site, AppPool Statuses)

This is a simple script that will query the Windows Services for the status of the required IIS services (IISADMIN, WAS, W3SVC) and also output the status of your IIS sites and apppools. Although it is a PowerShell script, it takes advantage of the built in┬ác:\windows\system32\inetsrv\appcmd.exe command-line feature – if you have not worked with this CLI tool before, I do encourage you to interact with it as it is a great tool for administering IIS through the CLI rather than inetmgr.

Here is a sample run:

Script executed by knguyen for 07-25-2018 10:03:23

Web Health Check for (Server name will be printed here)
————————————-

IIS Services
————-
IIS Admin Service ( IISADMIN ) – Stopped
Windows Process Activation Service ( WAS ) – Running
World Wide Web Publishing Service ( W3SVC ) – Stopped

Site Status
————–
SITE “Default Web Site” (id:1,bindings:http/*:80:,net.tcp/808:*,net.pipe/*,net.msmq/localhost,msmq.formatname/localhost,state:Unknown)

Apppool Status
————–
APPPOOL “DefaultAppPool” (MgdVersion:v4.0,MgdMode:Integrated,state:Started)
APPPOOL “ASP.NET v4.0” (MgdVersion:v4.0,MgdMode:Integrated,state:Started)
APPPOOL “ASP.NET v4.0 Classic” (MgdVersion:v4.0,MgdMode:Classic,state:Started)

Leave a Reply

Be the First to Comment!

avatar
  Subscribe  
Notify of