RESUME-SERVICE | TAKING ON POWERSHELL ONE CMDLET AT A TIME | WEEKLY BLOG
Adam Gordon
An Advanced Security Practitioner, Author, Global Speaker, Educator & Executive with decades of Cybersecurity/Information Assurance/GRC/Information Technology/Regulatory & Cloud experience.
This is a part of an on-going blog series written by ME ... Adam Gordon. Each week, I will walk you through a PowerShell command, showing you when and how to use each one. This week, Adam covers Resume-Service.
When to use Resume-Service?
The Resume-Service cmdlet sends a resume message to the Windows Service Controller for each of the specified services. If a service is suspended, it resumes.
If it is currently running, the message is ignored. You can specify the services by their service names or display names, or you can use the -InputObject parameter to pass a service object that represents the services that you want to resume.
What version of PowerShell am I using?
Get the PowerShell Version from your machine:
$PSVersionTable
This command shows you the PowerShell version information on your machine.
How to use Resume-Service?
Resume a service:
Resume-Service "Waves Audio Services"
This command resumes the Waves Audio Services service (WavesSysSvc64) service on the local computer.
Resume all suspended services:
This command resumes all of the suspended services on the computer. The Get-Service cmdlet command gets all of the services on the computer.
The pipeline operator (|) passes the results to the Where-Object cmdlet, which selects the services that have a Status property of Paused.
The next pipeline operator sends the results to Resume-Service, which resumes the paused services.
Get-Service | Where-Object {$_.Status -eq "Paused"} | Resume-Service
Thank you sir!