Set-AzureDeployment

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Set-AzureDeployment

Sets status, upgrade mode, and configuration settings of a Microsoft Azure deployment.

Syntax

Parameter Set: Config
Set-AzureDeployment [-Config] [-ServiceName] <String> [-Configuration] <String> [-Slot] <String> [[-ExtensionConfiguration] <ExtensionConfigurationInput[]> ] [ <CommonParameters>]

Parameter Set: Status
Set-AzureDeployment [-Status] [-ServiceName] <String> [-Slot] <String> [-NewStatus] <String> [ <CommonParameters>]

Parameter Set: Upgrade
Set-AzureDeployment [-Upgrade] [-ServiceName] <String> [-Package] <String> [-Configuration] <String> [-Slot] <String> [[-Mode] <String> ] [[-Label] <String> ] [[-RoleName] <String> ] [[-Force]] [[-ExtensionConfiguration] <ExtensionConfigurationInput[]> ] [ <CommonParameters>]

Detailed Description

The Set-AzureDeployment cmdlet sets the status, configuration settings, or upgrade mode of a Microsoft Azure deployment.

With the -Status parameter, you can change the status of the deployment to either "Running" or "Suspended". With the -Config parameter, you can update the .cscfg file, and with the -Upgrade parameter, you set the upgrade mode and update configuration files. Use the Set-AzureWalkUpgradeDomain cmdlet to actually initiate the upgrade.

Parameters

-Config

When specified, modifies the .cscfg file for the deployment.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Configuration<String>

Specifies the path to the new configuration (.cscfg) file when performing an upgrade or configuration change.

Aliases

none

Required?

true

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ExtensionConfiguration<ExtensionConfigurationInput[]>

When specified, requests an upgrade to the Microsoft Azure deployment.

Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Force

When specified, sets the upgrade to a forced upgrade.

Aliases

none

Required?

false

Position?

9

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Label<String>

Specifies a new label for the upgraded deployment.

Aliases

none

Required?

false

Position?

7

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Mode<String>

Specifies the mode of upgrade. Supported values are: "Auto", "Manual", and "Simultaneous".

Aliases

none

Required?

false

Position?

6

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewStatus<String>

Specifies the target status for the deployment. Supported values are "Running" or "Suspended".

Aliases

none

Required?

true

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Package<String>

Specifies the full path to the upgrade package (.cspkg) file.

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RoleName<String>

Specifies the name of the role to upgrade.

Aliases

none

Required?

false

Position?

8

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServiceName<String>

Specifies the Microsoft Azure service name of the deployment.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Slot<String>

Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging".

Aliases

none

Required?

true

Position?

5

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Status

When specified, requests a status change for the Microsoft Azure deployment.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Upgrade

When specified, requests an upgrade to the Microsoft Azure deployment.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This command sets the status of the deployment in the production environment to Running.

C:\PS>Set-AzureDeployment -Status -ServiceName "MySvc1" -Slot "Production" -NewStatus "Running"

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

This command updates the deployment in the staging environment with a new configuration file.

C:\PS>Set-AzureDeployment -Config -ServiceName "MySvc1" -Slot "Staging" -Configuration "C:\Temp\MyServiceConfig.Cloud.csfg"

-------------------------- EXAMPLE 3 --------------------------

Description

-----------

This command sets the upgrade mode to Auto and specifies an upgrade package and a new configuration file.

C:\PS>Set-AzureDeployment -Upgrade -ServiceName "MySvc1" -Mode Auto -Package "C:\Temp\MyApp.cspkg" -Configuration "C:\Temp\MyServiceConfig.Cloud.csfg"

-------------------------- EXAMPLE 4 --------------------------

Description

-----------

This example installs the extension configuration in the specified Cloud Service and applies them on roles.

C:\PS>Set-AzureDeployment –ServiceName –Mode Automatic $svc -Package $pkg -Configuration $cnfg -Slot Production -ExtensionConfiguration $wadConfig

Get-AzureDeployment

Move-AzureDeployment

New-AzureDeployment

Remove-AzureDeployment