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 the D:\pcg\T.cert is the certificate which is already uploaded to Azure too. The package and the configuration are the local copies of the application that is already running on Azure. I've tried to deploy them manually and they are working.
After executing this script I receive the following error message:
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> D:\PSScripts\dt2.ps1 New-Deployment : The remote server returned an unexpected response: (400) Bad Request. At 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 execute other cmdlets. For example to check the current deployments.