Sets the Windows Azure storage account to use when you deploy the current service.
Set-AzureDeploymentStorage [-AccountName] <string>
Run Set-AzureDeploymentStorage from a service directory to set the Windows Azure storage account to use when you deploy the service. This updates the service settings in the DeploymentSettings.json file. Then use Publish-AzureService to deploy the service using the deployment storage account.
A storage account provides access to Windows Azure storage services for a location (a geographic region) or an affinity group. Each storage account is associated with a Windows Azure subscription. For more information about storage accounts, see About the Storage Services API and Using the Windows Azure Storage Services.
If you do not set a storage account for a service, by using either the Set-AzureDeploymentStorage cmdlet or the -Storage parameter for Publish-AzureService, a new storage account is created during service deployment. The storage account is given same name as the service, and it provides access to storage in the service deployment location. You can use the storage account with other services that you deploy using the same subscription.
When a service is deployed, if the storage account that is used is not associated with the subscription that is used, the deployment fails.
If an existing storage account associated with a different subscription already has the service name, Windows Azure cannot create a storage account during service deployment. In that case, you must include the -StorageAccountName parameter to specify an existing storage account to use. For information about creating storage accounts, How to: Manage Storage Accounts for a Windows Azure Subscription.
|If you deploy multiple services to the same location using the same subscription, it can be efficient to use the same storage account for more than one service. For information about creating and deleting storage accounts, see How to: Manage Storage Accounts for a Windows Azure Subscription.|
Specifies the storage account to use when you deploy the current service. You must run this cmdlet from the service directory. The storage account name is case-sensitive.
Use the Get-AzureStorageAccounts cmdlet to return a list of available storage accounts for your subscription.
Set the Contoso_US storage account as the storage account to use to deploy the MyService service:
PS C:\node\MyService> Set-AzureDeploymentStorage Contoso_US