{"id":201,"date":"2015-05-12T10:58:00","date_gmt":"2015-05-12T10:58:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/azuregov\/2015\/05\/12\/using-azure-file-storage-with-azure-government\/"},"modified":"2015-05-12T10:58:00","modified_gmt":"2015-05-12T10:58:00","slug":"using-azure-file-storage-with-azure-government","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azuregov\/using-azure-file-storage-with-azure-government\/","title":{"rendered":"Using Azure File Storage with Azure Government"},"content":{"rendered":"<p>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?\n<a href=\"http:\/\/azure.microsoft.com\/en-us\/services\/storage\/files\/\">http:\/\/azure.microsoft.com\/en-us\/services\/storage\/files\/<\/a><\/p>\n<p>Let me guess you are getting an error that says:\n\u201cThe Remote name could not be resolved: \u2018youracount.file.core.windows.net\u2019\u201d\n<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/43\/2019\/03\/5756.blog1.jpg\"><img decoding=\"async\" width=\"500px\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/43\/2019\/03\/5756.blog1.jpg\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>Fear not the Azure Government Blog to the rescue!<\/p>\n<p>It is an easy fix, just add the \u2013Endpoint argument with the value of &#8220;core.usgovcloudapi.net&#8221; to your PowerShell and you should be good to go!<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/43\/2019\/03\/6607.blog2.jpg\"><img decoding=\"async\" width=\"500px\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/43\/2019\/03\/6607.blog2.jpg\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>The full commands should look something like this:<\/p>\n<p>$ctx=New-AzureStorageContext -StorageAccountName &#8220;&lt;&lt;MyAccount&gt;&gt;&#8221;\u00a0-StorageAccountKey &#8220;&lt;&lt;MyKey&gt;&gt;&#8221; <strong>-Endpoint &#8220;core.usgovcloudapi.net&#8221;<\/strong>\n$s = New-AzureStorageShare &lt;&lt;MyShare&gt;&gt; -Context $ctx\nNew-AzureStorageDirectory -Share $s -Path MyDir<\/p>\n<p>net use z: \\\\&lt;&lt;MyAccount&gt;&gt;.file.core.usgovcloudapi.net\\&lt;&lt;MyShare&gt;&gt; \/u:&lt;&lt;MyAccount&gt;&gt; &lt;&lt;MyKey&gt;&gt;<\/p>\n<p>Happy File Sharing \uf04a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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? http:\/\/azure.microsoft.com\/en-us\/services\/storage\/files\/ Let me guess you are getting an error that says: \u201cThe Remote name could not be resolved: [&hellip;]<\/p>\n","protected":false},"author":5375,"featured_media":20423,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[87,95],"class_list":["post-201","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azuregov","tag-azure-files","tag-azure-government"],"acf":[],"blog_post_summary":"<p>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? http:\/\/azure.microsoft.com\/en-us\/services\/storage\/files\/ Let me guess you are getting an error that says: \u201cThe Remote name could not be resolved: [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/users\/5375"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/comments?post=201"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/posts\/201\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/media\/20423"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/media?parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/categories?post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/tags?post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}