Skip to content
Caleb SmithCyberSecurityWithSmitti
Browse PowerShell example contentPowerShell example

07 · Get-Service: inspect service state

Observe local service state without changing it.

How to use it

Compare Name with DisplayName and note the collection time.

Platform and permissions

Windows; protected service details can be restricted.

What changes / what is read

Lists services. It does not start, stop or reconfigure them.

Scope and interpretation

Status alone does not reveal the service executable, identity or legitimacy. A stopped service is not automatically a fault.

Practice task

Explain why service path and start account need a separate review.

Reference

Microsoft documentation. Review the documentation for your installed version and use only an authorised learning or investigation environment.

This is personal educational material. Review the complete code and your signing policy before use. PowerShell code is displayed and downloaded as text; WordPress does not run it. Collection caps limit rows/files, not every provider’s wall-clock execution time.

PowerShell · PowerShell 5.1+ syntax target; Windows collectors require the stated Windows modules. Full Windows acceptance testing remains required.Download .ps1
#requires -Version 5.1
Get-Service | Sort-Object Status, DisplayName |
    Select-Object -First 50 Name, DisplayName, Status

Example code is displayed as text. Review it and test in your own lab before use.