Stop multiple services starting with same name

Stop multiple services starting with same name. Well I was in need to reboot a Windows 2008 server and before reboot all the application services were supposed to be stopped. I had to manually stop all services one by one. After couple of days I was requested to perform the same activity once again. This time I thought to look for an option to stop all services using single command. I found that all the application services names started in same format. Hence, below listed powershell command made my task very easy.

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

Note: Replace ABCD with your requirement.

Thanks,

WintelAdmin

Facebook Comments
Print Friendly
Filed under: Windows(2003/2008/2012)Tagged with: , , , , , , , ,

No comment yet, add your voice below!


Add a Comment

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

Comment *

Name *
Email *
Website