Running services

CMD

List all services:

C:> sc queryex type=service state=all

List service names only:

C:> sc queryex type=service state=all | find /i "SERVICE_NAME:"

Search for specific service:

C:> sc queryex type=service state=all | find /i "SERVICE_NAME: myService"

Get the status of a specific service: (including owner)

C:> sc qc myService

PowerShell

List all services:

PS C:> Get-Service

Search for specific service:

PS C:> Get-Service | Where-Object {$_.Name -like "myService"}

Get the status of a specific service:

PS C:> Get-Service myService

wmic

Current service and owners:

wmic service get name,startname

Get-ServiceAcl

Usage

Get-ServiceAcl -Name Hyperdrive

or

'Fake Service' | Get‐ServiceAcl | Select‐Object ‐ExpandProperty Access

Source

https://rohnspowershellblog.wordpress.com/2013/03/19/viewing-service-acls/

Last updated

Was this helpful?