Search notes:

PowerShell cmdLet stop-service

Stoping a set of services that satisfy a specific condition

The following pipeline find SQL Server related service that are running and stops them:
PS C:\>  get-service | where-object { $_.displayName -match '^SQL Server' -and $_.status -eq 'running' } | stop-service

See also

Powershell command noun: service

Index