How to export Windows Services list using command line

1 Comment

  1. The 2 commands (see below) suggested by the TWC article both give an error on my Win 7 SP1 machine:-
    Get-Service | Where Status -eq "Running" | Out-GridView
    Get-Service -ComputerName RemoteComputerName | Where Status -eq "Stopped" | Out-GridView

    I tried the following instead, & they work fine:-
    Get-service | where-object {$_.Status -eq "Running"} | Out-GridView
    OR: Get-service | ? {$_.Status -eq "Running"} | Out-GridView

    Get-Service -ComputerName RemoteComputerName | where-object {$_.Status -eq "Stopped"} | Out-GridView
    OR: Get-Service -ComputerName RemoteComputerName | ? {$_.Status -eq "Stopped"} | Out-GridView

Share via
Copy link
Powered by Social Snap