Restart-AzAppServicePlanManagedInstance
Recycles a worker in a Managed Instance App Service plan.
Syntax
S1 (Default)
Restart-AzAppServicePlanManagedInstance
[-ResourceGroupName] <String>
[-Name] <String>
-InstanceName <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
S2
Restart-AzAppServicePlanManagedInstance
[-AppServicePlan] <PSAppServicePlan>
-InstanceName <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
Description
The Restart-AzAppServicePlanManagedInstance cmdlet requests recycling of one Managed Instance worker.
Use Get-AzAppServicePlanManagedInstance to identify the worker name.
The cmdlet returns after the service accepts the request; it does not wait for the worker to become ready.
Recycling a worker can interrupt applications running on that worker.
Examples
Example 1: Recycle one worker
Restart-AzAppServicePlanManagedInstance -ResourceGroupName "ContosoRG" -Name "ContosoManagedPlan" -InstanceName "WORKER1" -PassThru
This command requests recycling of WORKER1 and returns true when the request is accepted.
Example 2: Preview a recycle request
Get-AzAppServicePlan -ResourceGroupName "ContosoRG" -Name "ContosoManagedPlan" |
Restart-AzAppServicePlanManagedInstance -InstanceName "WORKER1" -WhatIf
This command describes the recycle operation without submitting it.
Parameters
-AcquirePolicyToken
Acquire an Azure Policy token automatically for this resource operation.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AppServicePlan
The App Service plan object identifying the plan containing the worker.
Use Get-AzAppServicePlan to retrieve the object.
Parameter properties
Type: PSAppServicePlan
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
S2
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ChangeReference
The change reference resource ID for this resource operation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts for confirmation before requesting that the worker be recycled.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-InstanceName
The name of the Managed Instance worker to recycle.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the Managed Instance App Service plan.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
S1
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PassThru
Returns true after the service accepts the recycle request.
Without this parameter, no object is returned.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The resource group containing the Managed Instance App Service plan.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
S1
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Describes the recycle operation without submitting it to Azure.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs