Check the status of particular services on remote computers.txt - Notepad

Check the status of particular services on remote computers

The below PowerShell script can be used to check the status of particular services on remote computers.
(Get-Content C:\Users\user1\computer_names.txt) |
Foreach-Object {
get-service -Name service_name1, service_name2 -computername $_ | Select-Object displayname,name,status,machinename | sort machinename | Format-Table -autosize
} |
out-file c:\users\user1\results.txt

Back