Windows Azure Deployment – Problem and Solution #1

Note: I will start posting the series of “Problem/Solution” posts for Windows Azure deployment. As I intend to reach out to those people who have the same problem and search in Google or Bing, I will post the code, error message, output message  in details. Hence, that will make the post longer but I already told you about my intention. If you like to share your experience with Azure (esp: deployment), please feel free to share with me. 

Scott wrote a great post “CI DEPLOYMENT OF AZURE WEB ROLES USING TEAMCITY” about deploying Azure webrole from Azure PowerShell SDK. I used it as a reference when I was deploying one website and windows service to Azure web role and woker role but due to my settings that Scott might not have, I have to update a few things for his script. I am sharing it here for those who might have the same setting as I have.

Contents

Note: ScottGu announced about the release of Windows Azure SDK 2.2 (Please refer to this link Windows Azure: Announcing release of Windows Azure SDK 2.2 (with lots of goodies) for more information a few days back. But that version wasn’t available when I was playing around with Azure. All API that I used and the experience that I had comes from SDK 2.1.

Problem: Error in importing the module

You need to import the Azure module before you start doing anything with Azure CmdLet but if there is more than


Write-Output "Running Azure Imports"
Import-Module "C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\*.psd1"

Error Message

Import-Module : Path cannot be processed because it resolved to more than one file; can process only one file at a
time.
At line:1 char:1
+ Import-Module “C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Az …
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Collecti…[System.String]:Collection`1) [Import-Module], Runt
imeException
+ FullyQualifiedErrorId : AmbiguousPath,Microsoft.PowerShell.Commands.ImportModuleCommand

Import-Azure

Solution

Use Azure.psd1 instead.


Write-Output "Running Azure Imports"
Import-Module "C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1"

Output
PS C:\> Import-Module “C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1”
VERBOSE: Loading module from path ‘C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1’.
VERBOSE: Importing cmdlet ‘Add-AzureCacheWorkerRole’.
VERBOSE: Importing cmdlet ‘Add-AzureCertificate’.
VERBOSE: Importing cmdlet ‘Add-AzureDataDisk’.
VERBOSE: Importing cmdlet ‘Add-AzureDisk’.
VERBOSE: Importing cmdlet ‘Add-AzureDjangoWebRole’.
VERBOSE: Importing cmdlet ‘Add-AzureEndpoint’.
VERBOSE: Importing cmdlet ‘Add-AzureEnvironment’.
VERBOSE: Importing cmdlet ‘Add-AzureNodeWebRole’.
VERBOSE: Importing cmdlet ‘Add-AzureNodeWorkerRole’.
VERBOSE: Importing cmdlet ‘Add-AzurePHPWebRole’.
VERBOSE: Importing cmdlet ‘Add-AzurePHPWorkerRole’.
VERBOSE: Importing cmdlet ‘Add-AzureProvisioningConfig’.
VERBOSE: Importing cmdlet ‘Add-AzureVhd’.
VERBOSE: Importing cmdlet ‘Add-AzureVMImage’.
VERBOSE: Importing cmdlet ‘Add-AzureWebRole’.
VERBOSE: Importing cmdlet ‘Add-AzureWorkerRole’.
VERBOSE: Importing cmdlet ‘Disable-AzureServiceProjectRemoteDesktop’.
VERBOSE: Importing cmdlet ‘Disable-AzureWebsiteApplicationDiagnostic’.
VERBOSE: Importing cmdlet ‘Enable-AzureMemcacheRole’.
VERBOSE: Importing cmdlet ‘Enable-AzureServiceProjectRemoteDesktop’.
VERBOSE: Importing cmdlet ‘Enable-AzureWebsiteApplicationDiagnostic’.
VERBOSE: Importing cmdlet ‘Export-AzureVM’.
VERBOSE: Importing cmdlet ‘Get-AzureAclConfig’.
VERBOSE: Importing cmdlet ‘Get-AzureAffinityGroup’.
VERBOSE: Importing cmdlet ‘Get-AzureCertificate’.
VERBOSE: Importing cmdlet ‘Get-AzureDataDisk’.
VERBOSE: Importing cmdlet ‘Get-AzureDeployment’.
VERBOSE: Importing cmdlet ‘Get-AzureDisk’.
VERBOSE: Importing cmdlet ‘Get-AzureDns’.
VERBOSE: Importing cmdlet ‘Get-AzureEndpoint’.
VERBOSE: Importing cmdlet ‘Get-AzureEnvironment’.
VERBOSE: Importing cmdlet ‘Get-AzureLocation’.
VERBOSE: Importing cmdlet ‘Get-AzureMediaServicesAccount’.
VERBOSE: Importing cmdlet ‘Get-AzureOSDisk’.
VERBOSE: Importing cmdlet ‘Get-AzureOSVersion’.
VERBOSE: Importing cmdlet ‘Get-AzurePublishSettingsFile’.
VERBOSE: Importing cmdlet ‘Get-AzureRemoteDesktopFile’.
VERBOSE: Importing cmdlet ‘Get-AzureRole’.
VERBOSE: Importing cmdlet ‘Get-AzureSBAuthorizationRule’.
VERBOSE: Importing cmdlet ‘Get-AzureSBLocation’.
VERBOSE: Importing cmdlet ‘Get-AzureSBNamespace’.
VERBOSE: Importing cmdlet ‘Get-AzureService’.
VERBOSE: Importing cmdlet ‘Get-AzureServiceDiagnosticsExtension’.
VERBOSE: Importing cmdlet ‘Get-AzureServiceProjectRoleRuntime’.
VERBOSE: Importing cmdlet ‘Get-AzureServiceRemoteDesktopExtension’.
VERBOSE: Importing cmdlet ‘Get-AzureSqlDatabase’.
VERBOSE: Importing cmdlet ‘Get-AzureSqlDatabaseImportExportStatus’.
VERBOSE: Importing cmdlet ‘Get-AzureSqlDatabaseServer’.
VERBOSE: Importing cmdlet ‘Get-AzureSqlDatabaseServerFirewallRule’.
VERBOSE: Importing cmdlet ‘Get-AzureSqlDatabaseServerQuota’.
VERBOSE: Importing cmdlet ‘Get-AzureSqlDatabaseServiceObjective’.
VERBOSE: Importing cmdlet ‘Get-AzureStorageAccount’.
VERBOSE: Importing cmdlet ‘Get-AzureStorageBlob’.
VERBOSE: Importing cmdlet ‘Get-AzureStorageBlobContent’.
VERBOSE: Importing cmdlet ‘Get-AzureStorageBlobCopyState’.
VERBOSE: Importing cmdlet ‘Get-AzureStorageContainer’.
VERBOSE: Importing cmdlet ‘Get-AzureStorageKey’.
VERBOSE: Importing cmdlet ‘Get-AzureStorageQueue’.
VERBOSE: Importing cmdlet ‘Get-AzureStorageTable’.
VERBOSE: Importing cmdlet ‘Get-AzureStoreAddOn’.
VERBOSE: Importing cmdlet ‘Get-AzureSubnet’.
VERBOSE: Importing cmdlet ‘Get-AzureSubscription’.
VERBOSE: Importing cmdlet ‘Get-AzureVM’.
VERBOSE: Importing cmdlet ‘Get-AzureVMImage’.
VERBOSE: Importing cmdlet ‘Get-AzureVNetConfig’.
VERBOSE: Importing cmdlet ‘Get-AzureVNetConnection’.
VERBOSE: Importing cmdlet ‘Get-AzureVNetGateway’.
VERBOSE: Importing cmdlet ‘Get-AzureVNetGatewayKey’.
VERBOSE: Importing cmdlet ‘Get-AzureVNetSite’.
VERBOSE: Importing cmdlet ‘Get-AzureWebsite’.
VERBOSE: Importing cmdlet ‘Get-AzureWebsiteDeployment’.
VERBOSE: Importing cmdlet ‘Get-AzureWebsiteLocation’.
VERBOSE: Importing cmdlet ‘Get-AzureWebsiteLog’.
VERBOSE: Importing cmdlet ‘Get-AzureWinRMUri’.
VERBOSE: Importing cmdlet ‘Import-AzurePublishSettingsFile’.
VERBOSE: Importing cmdlet ‘Import-AzureVM’.
VERBOSE: Importing cmdlet ‘Move-AzureDeployment’.
VERBOSE: Importing cmdlet ‘New-AzureAclConfig’.
VERBOSE: Importing cmdlet ‘New-AzureAffinityGroup’.
VERBOSE: Importing cmdlet ‘New-AzureCertificateSetting’.
VERBOSE: Importing cmdlet ‘New-AzureDeployment’.
VERBOSE: Importing cmdlet ‘New-AzureDns’.
VERBOSE: Importing cmdlet ‘New-AzureMediaServicesAccount’.
VERBOSE: Importing cmdlet ‘New-AzureMediaServicesKey’.
VERBOSE: Importing cmdlet ‘New-AzureQuickVM’.
VERBOSE: Importing cmdlet ‘New-AzureRoleTemplate’.
VERBOSE: Importing cmdlet ‘New-AzureSBAuthorizationRule’.
VERBOSE: Importing cmdlet ‘New-AzureSBNamespace’.
VERBOSE: Importing cmdlet ‘New-AzureService’.
VERBOSE: Importing cmdlet ‘New-AzureServiceDiagnosticsExtensionConfig’.
VERBOSE: Importing cmdlet ‘New-AzureServiceProject’.
VERBOSE: Importing cmdlet ‘New-AzureServiceRemoteDesktopExtensionConfig’.
VERBOSE: Importing cmdlet ‘New-AzureSqlDatabase’.
VERBOSE: Importing cmdlet ‘New-AzureSqlDatabaseServer’.
VERBOSE: Importing cmdlet ‘New-AzureSqlDatabaseServerContext’.
VERBOSE: Importing cmdlet ‘New-AzureSqlDatabaseServerFirewallRule’.
VERBOSE: Importing cmdlet ‘New-AzureSSHKey’.
VERBOSE: Importing cmdlet ‘New-AzureStorageAccount’.
VERBOSE: Importing cmdlet ‘New-AzureStorageContainer’.
VERBOSE: Importing cmdlet ‘New-AzureStorageContext’.
VERBOSE: Importing cmdlet ‘New-AzureStorageKey’.
VERBOSE: Importing cmdlet ‘New-AzureStorageQueue’.
VERBOSE: Importing cmdlet ‘New-AzureStorageTable’.
VERBOSE: Importing cmdlet ‘New-AzureStoreAddOn’.
VERBOSE: Importing cmdlet ‘New-AzureVM’.
VERBOSE: Importing cmdlet ‘New-AzureVMConfig’.
VERBOSE: Importing cmdlet ‘New-AzureVNetGateway’.
VERBOSE: Importing cmdlet ‘New-AzureWebsite’.
VERBOSE: Importing cmdlet ‘Publish-AzureServiceProject’.
VERBOSE: Importing cmdlet ‘Remove-AzureAclConfig’.
VERBOSE: Importing cmdlet ‘Remove-AzureAffinityGroup’.
VERBOSE: Importing cmdlet ‘Remove-AzureCertificate’.
VERBOSE: Importing cmdlet ‘Remove-AzureDataDisk’.
VERBOSE: Importing cmdlet ‘Remove-AzureDeployment’.
VERBOSE: Importing cmdlet ‘Remove-AzureDisk’.
VERBOSE: Importing cmdlet ‘Remove-AzureEndpoint’.
VERBOSE: Importing cmdlet ‘Remove-AzureEnvironment’.
VERBOSE: Importing cmdlet ‘Remove-AzureMediaServicesAccount’.
VERBOSE: Importing cmdlet ‘Remove-AzureSBAuthorizationRule’.
VERBOSE: Importing cmdlet ‘Remove-AzureSBNamespace’.
VERBOSE: Importing cmdlet ‘Remove-AzureService’.
VERBOSE: Importing cmdlet ‘Remove-AzureServiceDiagnosticsExtension’.
VERBOSE: Importing cmdlet ‘Remove-AzureServiceRemoteDesktopExtension’.
VERBOSE: Importing cmdlet ‘Remove-AzureSqlDatabase’.
VERBOSE: Importing cmdlet ‘Remove-AzureSqlDatabaseServer’.
VERBOSE: Importing cmdlet ‘Remove-AzureSqlDatabaseServerFirewallRule’.
VERBOSE: Importing cmdlet ‘Remove-AzureStorageAccount’.
VERBOSE: Importing cmdlet ‘Remove-AzureStorageBlob’.
VERBOSE: Importing cmdlet ‘Remove-AzureStorageContainer’.
VERBOSE: Importing cmdlet ‘Remove-AzureStorageQueue’.
VERBOSE: Importing cmdlet ‘Remove-AzureStorageTable’.
VERBOSE: Importing cmdlet ‘Remove-AzureStoreAddOn’.
VERBOSE: Importing cmdlet ‘Remove-AzureSubscription’.
VERBOSE: Importing cmdlet ‘Remove-AzureVM’.
VERBOSE: Importing cmdlet ‘Remove-AzureVMImage’.
VERBOSE: Importing cmdlet ‘Remove-AzureVNetConfig’.
VERBOSE: Importing cmdlet ‘Remove-AzureVNetGateway’.
VERBOSE: Importing cmdlet ‘Remove-AzureWebsite’.
VERBOSE: Importing cmdlet ‘Reset-AzureRoleInstance’.
VERBOSE: Importing cmdlet ‘Restart-AzureVM’.
VERBOSE: Importing cmdlet ‘Restart-AzureWebsite’.
VERBOSE: Importing cmdlet ‘Restore-AzureWebsiteDeployment’.
VERBOSE: Importing cmdlet ‘Save-AzureServiceProjectPackage’.
VERBOSE: Importing cmdlet ‘Save-AzureVhd’.
VERBOSE: Importing cmdlet ‘Save-AzureVMImage’.
VERBOSE: Importing cmdlet ‘Save-AzureWebsiteLog’.
VERBOSE: Importing cmdlet ‘Select-AzureSubscription’.
VERBOSE: Importing cmdlet ‘Set-AzureAclConfig’.
VERBOSE: Importing cmdlet ‘Set-AzureAffinityGroup’.
VERBOSE: Importing cmdlet ‘Set-AzureAvailabilitySet’.
VERBOSE: Importing cmdlet ‘Set-AzureDataDisk’.
VERBOSE: Importing cmdlet ‘Set-AzureDeployment’.
VERBOSE: Importing cmdlet ‘Set-AzureEndpoint’.
VERBOSE: Importing cmdlet ‘Set-AzureEnvironment’.
VERBOSE: Importing cmdlet ‘Set-AzureLoadBalancedEndpoint’.
VERBOSE: Importing cmdlet ‘Set-AzureOSDisk’.
VERBOSE: Importing cmdlet ‘Set-AzureRole’.
VERBOSE: Importing cmdlet ‘Set-AzureSBAuthorizationRule’.
VERBOSE: Importing cmdlet ‘Set-AzureService’.
VERBOSE: Importing cmdlet ‘Set-AzureServiceDiagnosticsExtension’.
VERBOSE: Importing cmdlet ‘Set-AzureServiceProject’.
VERBOSE: Importing cmdlet ‘Set-AzureServiceProjectRole’.
VERBOSE: Importing cmdlet ‘Set-AzureServiceRemoteDesktopExtension’.
VERBOSE: Importing cmdlet ‘Set-AzureSqlDatabase’.
VERBOSE: Importing cmdlet ‘Set-AzureSqlDatabaseServer’.
VERBOSE: Importing cmdlet ‘Set-AzureSqlDatabaseServerFirewallRule’.
VERBOSE: Importing cmdlet ‘Set-AzureStorageAccount’.
VERBOSE: Importing cmdlet ‘Set-AzureStorageBlobContent’.
VERBOSE: Importing cmdlet ‘Set-AzureStorageContainerAcl’.
VERBOSE: Importing cmdlet ‘Set-AzureStoreAddOn’.
VERBOSE: Importing cmdlet ‘Set-AzureSubnet’.
VERBOSE: Importing cmdlet ‘Set-AzureSubscription’.
VERBOSE: Importing cmdlet ‘Set-AzureVMSize’.
VERBOSE: Importing cmdlet ‘Set-AzureVNetConfig’.
VERBOSE: Importing cmdlet ‘Set-AzureVNetGateway’.
VERBOSE: Importing cmdlet ‘Set-AzureWalkUpgradeDomain’.
VERBOSE: Importing cmdlet ‘Set-AzureWebsite’.
VERBOSE: Importing cmdlet ‘Show-AzurePortal’.
VERBOSE: Importing cmdlet ‘Show-AzureWebsite’.
VERBOSE: Importing cmdlet ‘Start-AzureEmulator’.
VERBOSE: Importing cmdlet ‘Start-AzureService’.
VERBOSE: Importing cmdlet ‘Start-AzureSqlDatabaseExport’.
VERBOSE: Importing cmdlet ‘Start-AzureSqlDatabaseImport’.
VERBOSE: Importing cmdlet ‘Start-AzureStorageBlobCopy’.
VERBOSE: Importing cmdlet ‘Start-AzureVM’.
VERBOSE: Importing cmdlet ‘Start-AzureWebsite’.
VERBOSE: Importing cmdlet ‘Stop-AzureEmulator’.
VERBOSE: Importing cmdlet ‘Stop-AzureService’.
VERBOSE: Importing cmdlet ‘Stop-AzureStorageBlobCopy’.
VERBOSE: Importing cmdlet ‘Stop-AzureVM’.
VERBOSE: Importing cmdlet ‘Stop-AzureWebsite’.
VERBOSE: Importing cmdlet ‘Test-AzureName’.
VERBOSE: Importing cmdlet ‘Update-AzureDisk’.
VERBOSE: Importing cmdlet ‘Update-AzureVM’.
VERBOSE: Importing cmdlet ‘Update-AzureVMImage’.
PS C:\>

5 thoughts on “Windows Azure Deployment – Problem and Solution #1

  1. This is too good to know that there are also a online tutorial to help me about windows 10 OS synchronization setting.Am glad to learn here all the steps free of cost and now sharing this with others.Much needed platform this is.

Leave a Reply

Your email address will not be published. Required fields are marked *