Q. How can I use Windows PowerShell to return a list of machine services in a designated state?

A. You can use PowerShell to examine a service object's Status property. You query the Status property with the Where-Object cmdlet, for example, to list only running services, as follows:

get-service | where-object \{$_.status -eq "Running"\}

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish