< Back

Set-AzureDeployment

Wed Jan 30, 2019 5:53 pm

NAME Set-AzureDeployment



SYNOPSIS

Modifies the status, configuration settings, or upgrade mode of a deployment.





SYNTAX

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> [-NewStatus] <String> [-Slot] <String> [-Profile <AzureSMProfile>] [-InformationAction

<ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]





DESCRIPTION

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.





PARAMETERS

-Upgrade [<SwitchParameter>]

Specifies that this cmdlet upgrades the deployment.



Required? true

Position? 0

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ServiceName <String>

Specifies the name of the Azure service of the deployment.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Package <String>

Specifies the full path of an upgrade package file.



Required? true

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Configuration <String>

Specifies the full path of a .cscfg configuration file. You can specify a configuration file for an upgrade or configuration change.



Required? true

Position? 3

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Slot <String>

Specifies the environment of the deployment to modify. Valid values are: Production and Staging.



Required? true

Position? 4

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Mode <String>

Specifies the mode of upgrade. Valid values are:



-- Auto



-- Manual



-- Simultaneous



Required? false

Position? 5

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Label <String>

Specifies a label for the upgraded deployment.



Required? false

Position? 6

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RoleName <String>

Specifies the name of the role to upgrade.



Required? false

Position? 7

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Indicates that cmdlet performs a forced upgrade.



Required? false

Position? 8

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ExtensionConfiguration <ExtensionConfigurationInput[]>

Specifies an array of extension configuration objects.



Required? false

Position? 9

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Config [<SwitchParameter>]

Specifies that this cmdlet modifies the configuration of the deployment.



Required? true

Position? 0

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Status [<SwitchParameter>]

Specifies that this cmdlet changes the status of the deployment.



Required? true

Position? 0

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-NewStatus <String>

Specifies the target status for the deployment. Valid values are: Running and Suspended.



Required? true

Position? 3

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- Example 1: Change the status of a deployment --------------------------



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.

-------------------------- Example 2: Assign a different configuration file to a deployment --------------------------



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.

-------------------------- Example 3: Set the upgrade mode to Auto --------------------------



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.

-------------------------- Example 4: Install extension configuration in a service --------------------------



PS C:\\>Set-AzureDeployment -Config -ServiceName "ContosoService" -Mode "Automatic" -Package

"https://contosostorage.blob.core.window ... kage.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.



RELATED LINKS

Get-AzureDeployment

Get-AzureDeploymentEvent

Remove-AzureDeployment

New-AzureDeployment

Remove-AzureDeployment

Set-AzureWalkUpgradeDomain