Remote version of Get-Service

This is a powershell version of get-service that works across remote machines (provided that you have sufficient access to the box).

function Get-ServiceRemote($computerName = “.”)
{
Get-WmiObject win32_service -ComputerName . | sort Name | select SystemName,State,Name,DisplayName
}

This can be passed through ft -Auto to become more readable.
A few scripts like these could be of great use in checking the state of a remote system.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s