Search code examples
azure-storagenet-use

"net use" for Azure File Services fails depending on OS type


Anyone know why the below "net use" command gets varied results depending on the machine OS even though I am logged on as an admin in all cases? Fails or works based on the OS within PowerShell or Cmd whether the shell is run as Administrator or not. The share is setup in Azure File Services and can be accessed on my Win10 machine just fine using Azure PowerShell cmdlets.

# mount azure share as a drive
net use x: \\[myaccount].file.core.windows.net\davesdata /user:[myaccount] [my secondary key]
  • Runs fine on Server 2012
  • Gets “access denied” on Server 2008
  • Gets “path not found” on Windows 10

Solution

  • Azure File Storage supports the following Windows / SMB variants: Windows 7 SMB 2.1, Windows Server 2008 R2 SMB 2.1, Windows 8 SMB 3.0, Windows Server 2012 SMB 3.0, Windows Server 2012 R2 SMB 3.0 and Windows 10 SMB 3.0.

    If you are connecting from a VM within the same Azure region you can connect using SMB 2.1 or SMB 3.0. If you are connecting from outside of the Azure region you need to ensure that Port 445 outbound is open. Many ISP's / corporate filewalls will block this. This wiki contains a list of ISP's that allow / disallow Port 445.