Resume-Service
Resumes one or more suspended (paused) services.
Resume-Service [-InputObject*] <ServiceController[]> [-Exclude [<String[]>]] [-Include [<String[]>]] [-PassThru][-Confirm] [-WhatIf] [<CommonParameters>]
Resume-Service [-Exclude [<String[]>]] [-Include [<String[]>]] [-PassThru] -DisplayName* <String[]> [-Confirm][-WhatIf] [<CommonParameters>]
Resume-Service [-Name*] <String[]> [-Exclude [<String[]>]] [-Include [<String[]>]] [-PassThru] [-Confirm] [-WhatIf][<CommonParameters>]
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.
Parameters |
---|
-DisplayName <String[]>
|
-Exclude [<String[]>]
|
-Include [<String[]>]
|
-InputObject <ServiceController[]>
|
-Name <String[]>
|
-PassThru [<SwitchParameter>]
|
-Confirm [<SwitchParameter>]
|
-WhatIf [<SwitchParameter>]
|
<CommonParameters>
|
Inputs
System.ServiceProcess.ServiceController, System.String
You can pipe a service object or a string that contains a service name to this cmdlet.
Outputs
None, System.ServiceProcess.ServiceController
This cmdlet generates a System.ServiceProcess.ServiceController object that represents the resumed service, if you specify the PassThru parameter. Otherwise, this cmdlet does not generate any output.
Examples
- Resume a service on the local computer:
PS C:> Resume-Service "sens"
This command resumes the System Event Notification service on the local computer. The service name is represented in the command by sens. The command uses the Name parameter to specify the service name of the service, but the command omits the parameter name because the parameter name is optional.
- Resume all suspended services:
PS C:> Get-Service | Where-Object {$_.Status -eq "Paused"} | Resume-Service
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.
In practice, you would use the WhatIf parameter to determine the effect of the command before you run it.
Additional Notes
The status of services that have been suspended is Paused. When services are resumed, their status is Running. Resume-Service can control services only when the current user has permission to do this. If a command does not work correctly, you might not have the required permissions. To find the service names and display names of the services on your system, type Get-Service. The service names appear in the Name column, and the display names appear in the DisplayName column.
Related Links
Get-Service
New-Service
Restart-Service
Set-Service
Start-Service
Stop-Service
Suspend-Service