get-service | sort name |
foreach {
if ( $_.Status -eq "Running")
{ write-host $_.Status $_.Name }
else
{ write-host -foreground RED -background YELLOW $_.Status $_.Name} }
Monday, September 07, 2009
Get Running/Stopped Services Using PowerShell
Here is a little snippet you can use to get a list of Stopped/Running services on your Windows box color coded by "State" (Running or Stopped)
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment