Search code examples
azureazure-storageazure-blob-storageazure-table-storageazure-files

Can I mount Azure Files Storage from my local Workstation?


I want to mount Azure Files Storage to my local Workstation. The documentation seems not to be clear at this point.

The note from documentation

Some Internet service providers may block port 445

seems to prove this szenario, but the net use doens't work localy (Azure VM works fine).

I get this Error:

“The network name cannot be found”

Documentation: https://github.com/Azure/azure-content/blob/master/articles/storage/storage-dotnet-how-to-use-files.md#mount-the-file-share-from-an-on-premises-client-running-windows

Edit:

  • Local Workstation runs with Windows 10 Pro
  • Command was net use <drive-letter>: \\<storage-account-name>.file.core.windows.net\<share-name> /u:<storage-account-name> <storage-account-key> It works from an Azure instance in the same region and subscription.

Edit 2:

It works, but only one time! After a reboot i ran into the same problem. A TCP Ping against the SMB Port succed only the azure vm.

Local Workstation

Test-NetConnection -ComputerName SHARENAME.file.core.windows.net -Port 445
TcpTestSucceeded       : False

Azure VM

Test-NetConnection -ComputerName SHARENAME.file.core.windows.net -Port 445
TcpTestSucceeded       : True

It seems, that my ISP is blocking port 445.


Solution

  • Obviously your mileage may vary, but this works fine for me

    I use the following Powershell script

    $pass = "password" | ConvertTo-SecureString -AsPlainText -Force
    $credentials = new-object -typename System.Management.Automation.PSCredential `
                              -argumentlist "topbanananas",$pass
    
    New-PSDrive -Name p -PSProvider FileSystem `
                -Root \\topbanananas.file.core.windows.net\fruity `
                -Credential $credentials -Persist