Resume-Service

 

Additional Resources for Resume-Service

 

Resuming a Paused Service

http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/resume-service.mspx

 

 

SYNOPSIS

Resumes one or more suspended (paused) services.

 

SYNTAX

Resume-Service [-name] <string[]> [-include <string[]>] [-exclude <string[]>] [-passthru] [-whatIf] [-confirm] [<CommonParameters>]

 

Resume-Service -displayName <string[]> [-include <string[]>] [-exclude <string[]>] [-passthru] [-whatIf] [-confirm] [<CommonParameters>]

 

Resume-Service [-inputObject <ServiceController[]>] [-include <string[]>] [-exclude <string[]>] [-passthru] [-whatIf] [-confirm] [<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

 

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

 

Required?

true

Position?

1

Default value

 

Accept pipeline input?  

true (ByValue, ByPropertyName)

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.

 

Required?

false

Position?

named

Default value

 

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.

 

Required?

false

Position?

named

Default value

 

Accept pipeline input?  

false

Accept wildcard characters? 

true

 

-passthru <SwitchParameter>

Passes the object created by this cmdlet through the pipeline. By default, this cmdlet does not pass any objects through the pipeline.

 

Required?

false

Position?

named

Default value

False

Accept pipeline input?  

false

Accept wildcard characters? 

false

 

-displayName <string[]>

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

 

Required?

true

Position?

named

Default value

 

Accept pipeline input?  

false

Accept wildcard characters? 

true

 

-inputObject <ServiceController[]>

Resumes the services represented by the specified ServiceController objects. Enter a variable that contains the objects or type a command or expression that gets the objects.

 

Required?

false

Position?

named

Default value

 

Accept pipeline input?  

true (ByValue)

Accept wildcard characters? 

false

 

-whatIf

Describes what would happen if you executed the command without actually executing the command.

 

Required?

false

Position?

named

Default value

 

Accept pipeline input?   F

alse

Accept wildcard characters? 

false

 

-confirm

Prompts you for confirmation before executing the command.

 

Required?

false

Position?

named

Default value

 

Accept pipeline input?  

false

Accept wildcard characters? 

false

 

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".

 

INPUT TYPE

Object

 

NOTES

 

For more information, type "Get-Help Resume-Service -detailed". For technical information, type "Get-Help Resume-Service -full".

 

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.

 

When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".

 

EXAMPLE 1

 

resume-service sens

 

This command resumes the System Event Notification service (service name = SENS) on the local computer. It uses the Name parameter to specify the service name of the service, but omits the parameter name, because it is optional.

 

EXAMPLE 2

 

get-service | where-object {$_.Status -eq "Paused"} | resume-service

 

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-Objectcmdlet, 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".

 

RELATED LINKS

Get-Service

Start-Service

Stop-Service

Restart-Service

Suspend-Service

Set-Service

New-Service