I am using Azure Management Cmdlets version 1.0.
I run the following PowerShell script
New-Deployment -subscriptionId bef7722c-1a13-4c9f-b7f6-fafc0a958b35 -certificate D: \ pcg \ ​​T.cer -serviceName 1ClickDeploymentTest -slot Production -package D: \ pcg
\ CloudTodorTest.cspkg -configuration D: \ pcg \ ​​ServiceConfiguration.cscfg -label lbl1 -StorageServiceName TodorTestStorage
where D: \ pcg \ ​​T.cert is a certificate that is already uploaded to Azure. The package and configuration are local copies of an application that is already running on Azure. I tried to deploy them manually and they work.
After running this script, the following error message appears:
PS C: \ Windows \ SysWOW64 \ WindowsPowerShell \ v1.0> D: \ PSScripts \ dt2.ps1 New deployment: the remote server returned an unexpected response: (400) "Bad request." In D: \ PSScripts \ dt2.ps1: 1 char: 15 + New deployment <<-subscriptionId bef7722c-1a13-4c9f-b7f6-fafc0a958b35 -certificate D: \ pcg \ ​​T.cer -serviceName 1Cli ckDeploymentTest -slot Staging - package D: \ pcg \ ​​CloudTodorTest.cspkg -configuration D: \ pcg \ ​​ServiceConfiguration.cscfg -l abel lbl1 -StorageServiceName TodorTestStorage | Get-OperationStatus -WaitToComplete + CategoryInfo: CloseError: (:) [New Deployment], ProtocolException + FullyQualifiedErrorId: Microsoft.Samples.AzureManagementTools.PowerShell.HostedServices.NewDeploymentCommand
I can run other cmdlets. For example, to check current deployment options.
source share