Syntax error How to get services on remote computers with PowerShell?

How to get services on remote computers with PowerShell?



To get service on the remote computer(s), simply you need to add parameter – ComputerName and provide remote servers computer name or IP address.

In the below example, we are getting services information on remote computer Win7 which has Automatic start-type.

Get-Service -ComputerName Win7 | Where{$_.StartType -eq "Automatic"}

Similarly, you can connect multiple computers separated by comma (,) in – ComputerName parameter.

Get-Service -ComputerName Win7, TestPC | Where{$_.StartType -eq "Automatic"}

If you need to identify on which particular computer(s), services exist, you can use the machinename property. In the above example, we are adding a machine name property in Pipeline.

Get-Service -ComputerName Win7, TestPC | Where{$_.StartType -eq "Automatic"} |
Select MachineName, Name, Status
Updated on: 2020-01-22T08:05:08+05:30

14K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements