![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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