0

I've written a script that allows users to start, stop, or check various services on various environments pertinent to our work. Currently, for IISReset, it checks all of the app pools it controls, ergo starts and stops too.

Is there a way to point to only two or three specific sites or app pools and not touch the others?

The current code I am using is...

& \env\Windows\System32\iisreset.exe /STATUS

Aidan Baker
  • 47
  • 1
  • 8

1 Answers1

1

These "programs" are called Services (they are registered in Windows as Services), so you can find the ones you are interested in, and then use the -Service cmdlets that are native to PowerShell to manage them (Get-Service,Stop-Service, Start-Service, etc.). Run gcm *-Service to see the list.

briantist
  • 45,546
  • 6
  • 82
  • 127