Using Azure File Storage with Azure Government
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?
Fear not the Azure Government Blog to the rescue!
It is an easy fix, just add the –Endpoint argument with the value of “core.usgovcloudapi.net” 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 “core.usgovcloudapi.net”
$s = New-AzureStorageShare <<MyShare>> -Context $ctx
New-AzureStorageDirectory -Share $s -Path MyDir
net use z: \\<<MyAccount>>.file.core.usgovcloudapi.net\<<MyShare>> /u:<<MyAccount>> <<MyKey>>
Happy File Sharing