24/7/365 Support

List All Running PowerShell Services

Problem

You want to see which services are running on the system.

Solution

To list all running services, use the GetService cmdlet: PS >GetService

Status
Name
DisplayName

Running
ADAM_Test
Test

Stopped
Alerter
Alerter

Running
ALG
Application Layer Gateway Service

Stopped
AppMgmt
Application Management

Stopped
aspnet_state
ASP.NET State Service

Running
AudioSrv
Windows Audio

Running
BITS
Background Intelligent Transfer Ser...

Running
Browser
Computer Browser

(...)
 

Discussion

The GetService cmdlet retrieves information about all services running on the system. Because these are rich .NET objects (of the type System.ServiceProcess. ServiceController), you can apply advanced filters and operations to make managing services straightforward.

For example, to find all running services:

PS >GetService | WhereObject { $_.Status eq "Running" }

Status Name DisplayName

Running ADAM_Test Test Running ALG Application Layer Gateway Service Running AudioSrv Windows Audio Running BITS Background Intelligent Transfer Ser... Running Browser Computer Browser Running COMSysApp COM+ System Application Running CryptSvc Cryptographic Services

Or, to sort services by the number of services that depend on them:

PS >GetService | SortObject Descending { $_.DependentServices.Count }

Status Name DisplayName

Running RpcSs Remote Procedure Call (RPC) Running PlugPlay Plug and Play Running lanmanworkstation Workstation Running SSDPSRV SSDP Discovery Service Running TapiSrv Telephony (...)

Since PowerShell returns fullfidelity .NET objects that represent system services, these tasks and more become incredibly simple due to the rich amount of information that PowerShell returns for each service. For more information about the GetService cmdlet, type GetHelp GetService.

The GetService cmdlet displays most (but not all) information about running services. For additional information (such as the service’s startup mode), use the GetWmiObject cmdlet:

$service = GetWmiObject Win32_Service | WhereObject { $_.Name eq "AudioSrv" } $service.StartMode

Help Category:

Get Windows Dedicated Server

Only reading will not help you, you have to practice it! So get it now.

Processor RAM Storage Server Detail
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 128 GB (SSD SATA) Configure Server
Intel Atom C2750 2.4 GHz 8c/8t 8 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Xeon E3-1230 v2 3.3 GHz 4c/8t 16 GB DDR3 1× 256 GB (SSD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 250 GB (SSD SATA) Configure Server

What Our Clients Say