I recently had to patch a server running all of the Netwrix products and it was taking forever because those services were using all 8 cores and 16GB the server had.

Here is a simple PowerShell command to stop multiple services that start with the same name:

Get-Service | Where-Object {$_.displayName.StartsWith(“ServiceName”)} | stop-Service

Replace SERVICENAME with the name of he service.

In my case the command was:

Get-Service | Where-Object {$_.displayName.StartsWith(“Nw")} | stop-Service

Note that this name is case sensitive.

If you want to stop all of the Microsoft SQL services at the same time use:

Get-Service | Where-Object {$_.displayName.StartsWith(“SQL")} | stop-Service


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *