- Trending Categories
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 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
Advertisements