Get-Service

Enumerate Windows services and their state.

Windowspassive

Get-Service lists services and whether they are running/stopped — useful for recon and hardening checks.

Syntax

Get-Service [-Name {pattern}]

Example

Get-Service | Where-Object Status -eq 'Running'

Lists all currently running services.

Options & flags

What each switch does. Toggle them in the builder below to assemble a command.

-Name <WinRM>Filter by service name.
-DisplayName <*SQL*>Filter by display name.
-ComputerName <HOST>Query a remote host.
-DependentServicesShow services that depend on it.

Command builder

Tick options (and fill any values) to build a ready-to-copy command.

get-service

Usage examples

Get-Service | ? Status -eq Running

List running services.

Get-Service -DisplayName "*SQL*"

Find SQL-related services.

Advantages
  • Built-in and fast
  • Pipeline-friendly objects
  • Can start/stop with sibling cmdlets
Disadvantages
  • Less detail than sc.exe/WMI
  • Remote needs configuration
  • Admin rights for some services
Tags
#windows#services

Official docs: Get-Service

Related commands

Frequently asked questions

What is Get-Service used for?
Get-Service lists services and whether they are running/stopped — useful for recon and hardening checks.
What is an example Get-Service command?
A common example is: Get-Service | Where-Object Status -eq 'Running' — Lists all currently running services.
Is Get-Service part of a standard install?
Get-Service runs on Windows. It is typically available by default.
What category of security tool is Get-Service?
Get-Service is a PowerShell tool with a passive-risk profile when run against a live target.

Try recon tools live

Run real scans against a domain you control, stage by stage.

Open the lab →