Set-AzureDeployment
Modifies the status, configuration settings, or upgrade mode of a deployment.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Important
Cloud Services (classic) is now deprecated for new customers and will be retired on August 31st, 2024 for all customers. New deployments should use the new Azure Resource Manager based deployment model Azure Cloud Services (extended support).
Set-AzureDeployment
[-Upgrade]
[-ServiceName] <String>
[-Package] <String>
[-Configuration] <String>
[-Slot] <String>
[[-Mode] <String>]
[[-Label] <String>]
[[-RoleName] <String>]
[-Force]
[[-ExtensionConfiguration] <ExtensionConfigurationInput[]>]
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
Set-AzureDeployment
[-Config]
[-ServiceName] <String>
[-Configuration] <String>
[-Slot] <String>
[[-ExtensionConfiguration] <ExtensionConfigurationInput[]>]
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
Set-AzureDeployment
[-Status]
[-ServiceName] <String>
[-Slot] <String>
[-NewStatus] <String>
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
The Set-AzureDeployment cmdlet modifies the status, configuration settings, or upgrade mode of an Azure deployment. You can change the status of the deployment to either Running or Suspended. You can change the .cscfg file for the deployment. You can set the upgrade mode and update configuration files. Use the Set-AzureWalkUpgradeDomain cmdlet to initiate an upgrade.
PS C:\> Set-AzureDeployment -Status -ServiceName "ContosoService" -Slot "Production" -NewStatus "Running"
This command sets the status of the deployment for the service named ContosoService in the production environment to Running.
PS C:\> Set-AzureDeployment -Config -ServiceName "ContosoService" -Slot "Staging" -Configuration "C:\Temp\MyServiceConfig.Cloud.csfg"
This command assigns a different configuration file for the deployment for the service named ContosoService in the staging environment.
PS C:\> Set-AzureDeployment -Upgrade -ServiceName "ContosoService" -Mode Auto -Package "C:\packages\ContosoApp.cspkg" -Configuration "C:\Config\ContosoServiceConfig.Cloud.csfg"
This command sets the upgrade mode to Auto, and specifies an upgrade package and a new configuration file.
PS C:\> Set-AzureDeployment -Config -ServiceName "ContosoService" -Mode "Automatic" -Package "https://contosostorage.blob.core.windows.net/container06/ContosoPackage.cspkg" -Configuration "C:\packages\ContosoConfiguration.cscfg" -Slot "Production" -ExtensionConfiguration "C:\packages\ContosoExtensionConfig.cscfg"
This command installs the extension configuration in the specified Cloud Service and applies them on roles.
Specifies that this cmdlet modifies the configuration of the deployment.
Type: | SwitchParameter |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the full path of a .cscfg configuration file. You can specify a configuration file for an upgrade or configuration change.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies an array of extension configuration objects.
Type: | ExtensionConfigurationInput[] |
Position: | 9 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Indicates that cmdlet performs a forced upgrade.
Type: | SwitchParameter |
Position: | 8 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
Type: | ActionPreference |
Aliases: | infa |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies an information variable.
Type: | String |
Aliases: | iv |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a label for the upgraded deployment.
Type: | String |
Position: | 6 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the mode of upgrade. Valid values are:
- Auto
- Manual
- Simultaneous
Type: | String |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the target status for the deployment. Valid values are: Running and Suspended.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the full path of an upgrade package file.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name of the role to upgrade.
Type: | String |
Position: | 7 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name of the Azure service of the deployment.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the environment of the deployment to modify. Valid values are: Production and Staging.
Type: | String |
Position: | 4 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies that this cmdlet changes the status of the deployment.
Type: | SwitchParameter |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies that this cmdlet upgrades the deployment.
Type: | SwitchParameter |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |