New-AzureDeployment
Syntax
New-AzureDeployment
[-ServiceName] <String>
[-Package] <String>
[-Configuration] <String>
[-Slot] <String>
[[-Label] <String>]
[[-Name] <String>]
[-DoNotStart]
[-ExtensionConfiguration <ExtensionConfigurationInput[]>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[-Profile <AzureSMProfile>]
[-TreatWarningsAsError]
[<CommonParameters>]
Description
The New-AzureDeployment cmdlet creates an Azure deployment from a service that comprises web roles and worker roles. This cmdlet creates a deployment based on a package file (.cspkg) and a service configuration file (.cscfg). Specify a name that is unique within deployment environment.
Use the New-AzureVM cmdlet to create a deployment based on Azure virtual machines.
Examples
Example 1: Create a deployment
PS C:\> New-AzureDeployment -ServiceName "ContosoService" -Slot "Production" -Package "https://contosostorage.blob.core.windows.net/container06/ContosoPackage.cspkg" -Configuration "C:\packages\ContosoConfiguration.cscfg" -Label "ContosoDeployment"
This command creates a production deployment based on a package named ContosoPackage.cspkg and a configuration named ContosoConfiguration.cscfg. The command specifies a label for the deployment. It does not specify a name. This cmdlet creates a GUID as the name.
Example 2: Create a deployment based on an extension configuration
PS C:\> New-AzureDeployment -ServiceName "ContosoService" -Slot "Production" -Package "https://contosostorage.blob.core.windows.net/container06/ContosoPackage.cspkg" -Configuration "C:\packages\ContosoConfiguration.cscfg" -ExtensionConfiguration "C:\packages\ContosoExtensionConfig.cscfg"
This command creates a production deployment based on a package and configuration. The command specifies an extension configuration named ContosoExtensionConfig.cscfg. This cmdlet creates GUIDs as the name and the label.
Required Parameters
Specifies the full path of a service configuration file.
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the path or URI of a .cspkg file in storage within the same subscription or project.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the Azure service for the deployment.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the environment where this cmdlet creates the deployment. Valid values are: Staging and Production. The default value is Production.
| Type: | String |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Optional Parameters
Specifies that this cmdlet does not start the deployment.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies an array of extension configuration objects.
| Type: | ExtensionConfigurationInput[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| 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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies an information variable.
| Type: | String |
| Aliases: | iv |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies a label name for the deployment. If you do not specify a label, this cmdlet uses a GUID.
| Type: | String |
| Position: | 4 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies a deployment name. If you do not specify a name, this cmdlet uses a GUID.
| Type: | String |
| Aliases: | DeploymentName |
| Position: | 5 |
| Default value: | None |
| 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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies that warning messages are errors. If you specify this parameter, a warning message causes the deployment to fail.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |