你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Restart-AzWebAppSlot
重启 Azure Web 应用槽。
语法
Restart-AzWebAppSlot
[-SoftRestart]
[-ResourceGroupName] <String>
[-Name] <String>
[-Slot] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Restart-AzWebAppSlot
[-SoftRestart]
[-WebApp] <PSSite>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Restart-AzWebAppSlot cmdlet 停止,然后启动 Azure Web 应用槽。 如果 Web 应用槽处于停止状态,请使用 Start-AzWebAppSlot cmdlet。
示例
示例 1
Restart-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot "Slot001"
此命令为与资源组 Default-Web-WestUS 关联的 Web 应用 ContosoWebApp 重启槽 Slot001
参数
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Name
WebApp 名称
类型: | String |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
资源组名称
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Slot
WebApp 槽名称
类型: | String |
Position: | 2 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-SoftRestart
指定 true 以应用配置设置,并仅在必要时重新启动应用。 默认情况下,API 始终重启并重新预配应用。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WebApp
WebApp 对象
类型: | PSSite |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |