21 Jan

Azure file storage for your local computer

You probably know OneDrive, Dropbox, Google Drive,… and many more cloud storage services. Well did you know that you could do the same thing with Azure File storage? I’ll show you how in this post!

Create the script

Create an Azure file storage account

Start off by creating your Azure Cloud storage. I used the “normal” storage, not the classic one.
Once that is done you can go and create your file share container and give it a quota. The share will just be like a hard drive, it can not exceed the quota you give it.


Get your connection info

Once you create your file share it’s time to get your connection string.

AzureFileGetConnection AzureFileGetConnection2

Notice how it says “To connect to this file share, run this command from any Windows virtual machine on the same subscription and location:“. Don’t worry about that. I was able to add it to my Windows 10 computer at home without a problem.

The storage account access keys can be found here:


The script

net use [drive letter]: /delete
net use [drive letter]: \\[storage account name].file.core.windows.net\[file service name] /u:[storage account name] [storage account access key]

Adding the drive to Windows

Create the script as a bat file. You could just click it and the drive will be added.

Unfortunately you will have to re-add the drive every time Windows starts up. To automate this, you can simply add the bat file to your startup folder. To simply get your folder just execute the shell:startup command.


When connecting from a computer from outside Azure, remember to open outbound TCP port 445 in your local network. Some Internet service providers may block port 445. Check with your service provider for details.

All done!

That’s it, you’ve added the file storage to your local computer as a network hard drive.
Go to My Computer and you will see it shine!

Don’t forget that Azure comes with a price, although it’s quite cheap if you ask me. You can start off with €2.02 for 100Gb of storage.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.