Using Azure File Storage with Azure Government

Shawn Weisfeld

So you have looked at the docs and you would like to give Azure File Storage a try, but you are having trouble connecting it to Azure Government following the instructions posted on the public Azure site?

Let me guess you are getting an error that says: “The Remote name could not be resolved: ‘’”

Fear not the Azure Government Blog to the rescue!

It is an easy fix, just add the –Endpoint argument with the value of “” to your PowerShell and you should be good to go!

The full commands should look something like this:

$ctx=New-AzureStorageContext -StorageAccountName “<<MyAccount>>” -StorageAccountKey “<<MyKey>>” -Endpoint “” $s = New-AzureStorageShare <<MyShare>> -Context $ctx New-AzureStorageDirectory -Share $s -Path MyDir

net use z: \\<<MyAccount>>\<<MyShare>> /u:<<MyAccount>> <<MyKey>>

Happy File Sharing 


Discussion is closed.

Feedback usabilla icon