get-wmiobject win32_service -computer all computer code example
Example: get-wmiobject win32_service -computer all computer
PS C:\> get-wmiobject win32_service -computername (get-content Computers.txt) -filter "Name='dhcp'" |
select-object __SERVER,Name,DisplayName,State |
export-csv Results.csv -notypeinformation