How to get services on remote computers with PowerShell?
https://www.tutorialspoint.com/how-to-get-services-on-remote-computers-with-powershell
-
13-09-2020 - |
سؤال
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
Advertisements
لا تنتمي إلى Tutorialspoint