Powershell

How to Use the Resume-Service (Microsoft.PowerShell.Management) Cmdlet in PowerShell?

The “Resume-Service” cmdlet is used to resume one or more paused services in PowerShell. When a service is suspended, the “Resume-Service” cmdlet notifies the “Windows Service Controller” to resume it. If the specified service is suspended, it will be resumed. If it is already running, then the message will be ignored.

This tutorial will elaborate on the use of PowerShell’s “Resume-Service” cmdlet.

How to Use the PowerShell’s Resume-Service Cmdlet?

As it is stated above, the “Resume-Service” cmdlet resumes the suspended services in PowerShell. To do so, simply assign the suspended service name to the “Resume-Service” cmdlet.

Syntax

The syntax of the “Resume-Service” cmdlet is provided below:

Resume-Service [-InputObject] [CommonParameters]

Example 1: Use the “Resume-Service” Cmdlet to Resume a Service on the Local Computer

To resume service in PowerShell, first, use the “Resume-Service” cmdlet and specify the service name:

Resume-Service "LanmanWorkstation"

Example 2: Use the “Resume-Service” Cmdlet to Resume All Suspended Services

First, use the “Get-Service” cmdlet and pipe it to the “Where-Object” condition. Then, describe the current status of all suspended services as “Paused”. Lastly, pipe the command to the “Resume-Service” cmdlet to resume all the paused services:

Get-Service | Where-Object {$_.Status -eq "Paused"} | Resume-Service

That’s it! You have learned the usage of PowerShell’s “Resume-Service” cmdlet.

Conclusion

To resume the suspended or paused services in PowerShell, the “Resume-Service” cmdlet is used. For that purpose, it will send the message to the “Windows Service Controller” to resume the suspended service. This guide has discussed the usage of the “Resume-Service” cmdlet in PowerShell.

About the author

Muhammad Farhan

I am a Computer Science graduate and now a technical writer who loves to provide the easiest solutions to the most difficult problems related to Windows, Linux, and Web designing. My love for Computer Science emerges every day because of its ease in our everyday life.