CmdID / PowerShell / Cmdlets / Suspend
Suspend-Service
Suspends (pauses) one or more running services. PowerShell reference
From the PowerShell reference 8 parameters
What it does
Suspends (pauses) one or more running services. The Suspend-Service cmdlet sends a suspend message to the Windows Service Controller for each of the specified services. While suspended, the service is still running, but its action is stopped until resumed, such as by using the Resume-Service cmdlet. 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 suspend.
Suspend-Service [-InputObject] <ServiceController[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]Suspend-Service [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]Suspend-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Suspend a service
Suspend-Service -DisplayName "Telnet"IdentifyDisplay what would happen if you suspend services
Suspend-Service -Name lanman* -WhatIfIdentifyGet and suspend a service
Get-Service schedule | Suspend-ServiceIdentifySuspend all services that can be suspended
Get-Service |
Where-Object { $_.CanPauseAndContinue } |
Suspend-Service -ConfirmIdentifyIts page in the reference: Suspend-Service.
Parameters
-DisplayNameSpecifies the display names of the services to be suspended. Wildcard characters are permitted.-ExcludeSpecifies services to omit from the specified services. The value of this parameter qualifies the Name parameter. Enter a name element or pattern, such as "s*". Wildcard characters are permitted.-IncludeSpecifies services to suspend. The value of this parameter qualifies the Name parameter. Enter a name element or pattern, such as "s*". Wildcard characters are permitted.-InputObjectSpecifies ServiceController objects that represent the services to suspend. Enter a variable that contains the objects, or type a command or expression that gets the objects.-NameSpecifies the service names of the services to suspend. Wildcard characters are permitted.
The parameter name is optional. You can use Name or its alias, ServiceName, or you can omit the parameter name.-PassThruReturns an object representing the item with which you are working. By default, this cmdlet does not generate any output.-ConfirmPrompts you for confirmation before running the cmdlet.-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.