Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Resume-Service

Resume-Service

microsoft.powershell.commands.management.dll

Synopsis

Resumes one or more suspended (paused) services.

Syntax

Resume-Service [-InputObject] [-Exclude] [-Include] [-PassThru] [<CommonParameters>]

Resume-Service [-Exclude] [-Include] [-PassThru] [-DisplayName] [<CommonParameters>]

Resume-Service [-Name] [-Exclude] [-Include] [-PassThru] [<CommonParameters>]

Detailed Description

The Resume-Service cmdlet sends a resume message to the Windows Service Controller for each of the specified services. If they have been suspended, they will resume service. If they are 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[]>

Specifies the display names of the services to be resumed. Wildcards are permitted.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

true

-Exclude <String[]>

Omits the specified services. The value of this parameter qualifies the Name parameter. Enter a name element or pattern, such as "s*". Wildcards are permitted.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

true

-Include <String[]>

Resumes only the specified services. The value of this parameter qualifies the Name parameter. Enter a name element or pattern, such as "s*". Wildcards are permitted.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

true

-InputObject <ServiceController[]>

Specifies ServiceController objects representing the services to be resumed. Enter a variable that contains the objects, or type a command or expression that gets the objects.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-Name <String[]>

Specifies the service names of the services to be resumed.

The parameter name is optional. You can use "-Name" or its alias, "-ServiceName", or you can omit the parameter name.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName, ByValue)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Returns an object representing the service. By default, this cmdlet does not generate any output.

Aliases

None

Required?

false

Position

named

Default value

False

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

System.ServiceProcess.ServiceController or System.String

Return Type

None or System.ServiceProcess.ServiceController

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 so. 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.

Examples

-------------------------- EXAMPLE 1 --------------------------

This command resumes the System Event Notification service (the service name is represented in the command by "sens") on the local computer. 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.

PS C:\>resume-service sens

-------------------------- EXAMPLE 2 --------------------------

This command resumes all of the suspended (paused) services on the computer. The first command gets all of the services on the computer. The pipeline operator (|) passes the results to the Where-Object cmdlet, which selects the services with 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 running it without WhatIf.

PS C:\>get-service | where-object {$_.Status -eq "Paused"} | resume-service

Online Version
Get-Service
New-Service
Restart-Service
Set-Service
Start-Service
Stop-Service
Suspend-Service