Monday, March 22, 2010

List of services running on the server using PowerShell

As a systems administrator, there would always be a requirement for us to check if the particular services in the servers are running on that. To fix this, we can use the powershell script which shall give us the list of services running on a particular server and its status. We can also have a list of servers and get the powershell script run which would give details of the services from all the servers, We need to make sure that the account using which you would run this script is an administrator on all the servers on which you want to validate.

The powershell script is

$a = get-wmiobject win32_service -ComputerName "mymachine"

$a | select name,startname,startmode,state

Hope this helps....

No comments:

Post a Comment