James Simon Welcome to Microsoft Q&A, thank you for posting your here!!
To access the Azure File share Publicly please follow below steps:
Step:1 Create Azure Storage account from Azure Portal
Step:2 Create Azure File share
Step:3 Now access the created Azure File share from your on-premises machine through UNC path.
Click on the Connect option from the newly created Azure File share.
Copy the Script in the Notepad and note the -Root and User and pass fields to use in the below steps.
$connectTestResult = Test-NetConnection -ComputerName archivecopytest.file.core.windows.net -Port 445
if ($connectTestResult.TcpTestSucceeded) {
# Save the password so the drive will persist on reboot
cmd.exe /C "cmdkey /add: "storageaccountname.file.core.windows.net" /user:`"localhost\storageaccountname`" /pass:`"accesskey"
# Mount the drive
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\storageaccountname.file.core.windows.net\myfileshare" -Persist
} else {
Write-Error -Message "Unable to reach the Azure storage account via port 445. Check to make sure your organization or ISP is not blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a different port."
}
You can directly access your Azure file share using the UNC path by entering the following into File Explorer. Be sure to replace storageaccountname with your storage account name and myfileshare with your file share name:
\\storageaccountname.file.core.windows.net\myfileshare
You'll be asked to sign in with your network credentials. Sign in with the Azure subscription under which you've created the storage account and file share. If you do not get prompted for credentials you can add the credentials using the following command:
cmdkey /add:StorageAccountName.file.core.windows.net /user:localhost\StorageAccountName /pass:StorageAccountKey
For Azure Government Cloud, simply change the servername to:
\\storageaccountname.file.core.usgovcloudapi.net\myfileshare
Reference Link: https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows#access-an-azure-file-share-via-its-unc-path
Important Note:
Ensure port 445 is open: The SMB protocol requires TCP port 445 to be open. Connections will fail if port 445 is blocked. You can check if your firewall or ISP is blocking port 445 by using the Test-NetConnection
cmdlet. See Port 445 is blocked.
Hope this helps!
Kindly let us know if the above helps or you need further assistance on this issue.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.