You can do something like this
Get-Service -ComputerName localhost, remotehost |
Select-Object MachineName, Name, DisplayName, Status |
Group-Object -Property MachineName |
ForEach-Object {
$_.Name
"----------------"
$_.Group |
ForEach-Object {
"$($_.Name), $($_.DisplayName), $($_.Status)"
}
""
}
Results like:
Truncated lists to reduce post size.
localhost
----------------
AdobeActiveFileMonitor11.0, Adobe Active File Monitor V11, Stopped
AdobeARMservice, Adobe Acrobat Update Service, Running
AdobeFlashPlayerUpdateSvc, Adobe Flash Player Update Service, Stopped
AeLookupSvc, Application Experience, Running
AESTFilters, Andrea ST Filters Service, Running
ALG, Application Layer Gateway Service, Stopped
AppIDSvc, Application Identity, Stopped
Appinfo, Application Information, Running
Apple Mobile Device Service, Apple Mobile Device Service, Running
remotehost
----------------
AdobeARMservice, Adobe Acrobat Update Service, Running
AdobeFlashPlayerUpdateSvc, Adobe Flash Player Update Service, Stopped
AeLookupSvc, Application Experience, Running
ALG, Application Layer Gateway Service, Stopped
AppIDSvc, Application Identity, Stopped
Appinfo, Application Information, Running
AppMgmt, Application Management, Stopped
aspnet_state, ASP.NET State Service, Stopped
AudioEndpointBuilder, Windows Audio Endpoint Builder, Running
AudioSrv, Windows Audio, Running