Edit

Share via


Restart-AzWebAppSlot

Restarts an Azure Web App Slot.

Syntax

S1

Restart-AzWebAppSlot
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-Slot] <String>
    [-SoftRestart]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

S2

Restart-AzWebAppSlot
    [-WebApp] <PSSite>
    [-SoftRestart]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Restart-AzWebAppSlot cmdlet stops and then starts an Azure Web App Slot. If the Web App Slot is in a stopped state, use the Start-AzWebAppSlot cmdlet.

Examples

Example 1

Restart-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot "Slot001"

This command restarts the slot Slot001 for the web app ContosoWebApp associated with the resource group Default-Web-WestUS

Parameters

-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

-Name

WebApp Name

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:True
Value from remaining arguments:False

-ResourceGroupName

Resource Group Name

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

-Slot

WebApp Slot Name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

S1
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SoftRestart

Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts and reprovisions the app.

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

-WebApp

WebApp Object

Parameter properties

Type:PSSite
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

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.

Inputs

String

PSSite

Outputs

PSSite