Getting Started with Azure Government

 Update - 4/4/2017 - 


This post is now redundant, all you have to use is the Environment Variable -->


Add-AzureAccount -Environment AzureUSGovernment


Yep ! Thats it 🙂 For endpoint mapping - you can still use this reference or use Get-AzureEnvironment AzureUSGovernment to give you all the details


Original Article

If you are just getting started with Azure government, you would have realized by now, that there are a few things which needs to be changed in order to get it working exactly like how it did in Azure Public. To begin with here are a couple of things, I will keep updating this post as and when I stumble upon newer things which needs change in order to work with Azure Government


Azure Government PowerShell


To get started with managing Azure Government using PowerShell, you would need to make a couple of modifications before actually running the Import-AzurePublishingSettings file

  • Add-AzureEnvironment -name “AzureGovernment” -PublishSettingsFileUrl “” -ServiceEndpoint “” -ManagementPortalUrl “” -StorageEndpoint “” -ActiveDirectoryEndpoint “” -ActiveDirectoryServiceEndpointResourceId “” -ResourceManagerEndpoint “” -GalleryEndpoint “” 


  • Set-AzureEnvironment “AzureGovernment”



Endpoint Mapping


The endpoints are slightly different for Azure Government when compared to Azure Public. Please refer below for the mapping.



Management Portal
General * *
Core * *
Compute * *
Blob Storage * *
Queue Storage * *
Table Storage * *
Service Management
SQL Database * *




For example, when trying to create a Storage context using PowerShell you would add the following switch –EndPoint:


$endpointsuffix = ""

New-AzureStorageContext –StorageAccountName $sourceStorageAcc -StorageAccountKey $sourceStoragKey -Endpoint $endpointsuffix

Azure Media Services in Azure Government

In order to connect to Azure Media Services in Azure Government, the following changes need to be in place. All the below information can be retrieved when you click on Manage Keys under Azure Media Services.

While setting up the credentials:


Please do let me know if you have any questions in the comments section.


Good Luck

Anand Kumar R

Comments (0)

Skip to main content