How to display specific properties from Get-Service output in PowerShell?


To display the other properties of the services than the default ones (which are supported by Get-Member), you need to pipeline the Select-Object (alias Select) command. For example, in the below command we will display theService name, start type and status of the service.

Command

Get-Service | Select-Object Name, StartType, Status

Output

Name                                                   StartType  Status
----                                                   ---------  ------
AarSvc_158379                                             Manual Stopped
AdobeARMservice                                        Automatic Running
AdobeFlashPlayerUpdateSvc                                 Manual Stopped
AJRouter                                                  Manual Stopped
ALG                                                       Manual Stopped
AppIDSvc                                                  Manual Stopped
Appinfo                                                   Manual Running
AppMgmt                                                   Manual Stopped
AppReadiness                                              Manual Stopped
AppVClient                                              Disabled Stopped
AppXSvc                                                   Manual Stopped
AssignedAccessManagerSvc                                  Manual Stopped
AudioEndpointBuilder                                   Automatic Running
Audiosrv                                               Automatic Running
autotimesvc                                               Manual Stopped
AVP20.0                                                Automatic Running
AxInstSV                                                  Manual Stopped
BcastDVRUserService_158379                                Manual Stopped
BDESVC                                                    Manual Stopped
BFE                                                    Automatic Running
BITS                                                   Automatic Running
Bluetooth Device Monitor                               Automatic Running
Bluetooth OBEX Service                                 Automatic Running
BluetoothUserService_158379                               Manual Stopped
BrokerInfrastructure                                   Automatic Running

Command

You can also sort the properties of the object by Sort-Object. In the below example, services are sorted by their start type.

Get-Service | Select Name,Status,StartType | Sort-Object StartType

Output

Audiosrv                                               Running Automatic
CDPUserSvc_158379                                      Running Automatic
BrokerInfrastructure                                   Running Automatic
DellClientManagementService                            Running Automatic
Bluetooth Device Monitor                               Running Automatic
BFE                                                    Running Automatic
BITS                                                   Running Automatic
AdobeARMservice                                        Running Automatic
ZeroConfigService                                      Running Automatic
DeviceAssociationService                               Running Automatic
Bluetooth OBEX Service                                 Running Automatic
Dell Hardware Support                                  Running Automatic
DDVRulesProcessor                                      Running Automatic
svsvc                                                  Stopped    Manual
WPDBusEnum                                             Stopped    Manual
stisvc                                                 Stopped    Manual
StorSvc                                                Running    Manual
vmickvpexchange                                        Stopped    Manual
swprv                                                  Stopped    Manual
SstpSvc                                                Running    Manual
workfolderssvc                                         Stopped    Manual
SSDPSRV                                                Running    Manual
WpcMonSvc                                              Stopped    Manual
SNMPTRAP                                               Stopped    Manual
spectrum                                               Stopped    Manual
StateRepository                                        Running    Manual
SDRSVC                                                 Stopped    Manual
XblAuthManager                                         Stopped    Manual

Updated on: 22-Jan-2020

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements