UPDATED: Mapping the Azure Storage Blob to a Drive Letter in Explorer

When working with Dynamics machines in Azure you might want to move database backups from one VM to another and since they are not on the same network it is i little trickier. One option is to move the file using RDP… we have a couple of issues here… large files do not work/take a long lime… your computer is tied up since you cannot shut it down or use the clip board while copying… we need another solution.

The solution is Azure File Share but we need a simple solution to use them. We will map it to a drive letter:

  1. To create a storage file share start by logging into the Azure Portal
  2. Create a new Storage account or use an existingimage
  3. Select File Service – Files
  4. Click + File share, give the share a name and click OKimage
  5. Go back to the Storage Account and select Access Keys
  6. Copy one of the access key
  7. Start Command Prompt and enter this command to map the drive:
    net use z: \\[StorageAccountName].file.core.windows.net\[fileshare] /u[StrorageAccountName] [StorageAccountKey]

UPDATE: Do not start the command prompt as administrator

Note: You need external access on port 445 which means that this might not work from your ISP or from your company network. It does however work great from Azure

Comments

6 responses to “UPDATED: Mapping the Azure Storage Blob to a Drive Letter in Explorer”

  1. […] 4. Copy the bacpac file to the destination serverNote: If you have a large file you can use an Azure Storage Blog […]

  2. […] Note: I usually store the DB backup in an Azure Storage Blog since this is the easiest way to move file between environments. See here […]

  3. Jim
    Jim

    You talk about Blob but actually use an Azure File share to do the mapping….

    1. Johan

      @Jim… You are absolutely correct. Of course I mean Azure File Share. I have changed it

      Thanks

      /Johan

  4. Scott
    Scott

    I had some issues with your command – I used the following syntax on Windows 10:

    net use z: \\[StorageAccountName].file.core.windows.net\[fileshare] /user:[StrorageAccountName] [StorageAccountKey]

    While this creates the Z: drive, it wasn’t visible in File Explorer. I was able to use the File Explorer / This PC / Network – Map network drive option using the [StorageAccountName].file.core.windows.net\[fileshare] for the Folder, and checking the “Connect Using different credentials” option. This passed the [StorageAccountName] as the user and I used the [StorageAccountKey] as the password. I did have to click OK twice, but I can now see it like every other drive in File Explorer.

    1. Johan

      HI…

      Thanks for your comment

      I think your issue is that you are running command prompt elevated. You should run it as usual

      I will add this clarification to the post

      Johan

Leave a Reply