to find running services that contain the character sequence 'sql' in the service's name
PS R:\> get-service "*sql*"
| where-object { $_.status -eq "running" }
or,
PS R:\> get-service
| where-object { $_.status -eq "running" }
| where-object { $_.name -match ".*sql.*" }
Status Name DisplayName
------ ---- -----------
Running MSSQLServer MSSQLServer
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment