# How to mount an Azure Files share in Windows

# Files at scale in the cloud

Azure Files (opens new window) is part of the Azure Storage (opens new window) offering, and provides a secure and performant place to store and share files. It works just like a file folder. You can scale it to your needs, and make it as performant and redundant as you need. You can also use Azure Files as a file share that you mount in your operating system.

In this post, we'll mount an Azure Files share in Windows and use it as a regular network drive.

# Prerequisites

If you want to follow along, you'll need the following:

# Mount an Azure Files share

We'll start by creating an Azure Files share, which we'll mount in Windows.

  1. Go to the Azure portal (opens new window) and navigate to your Azure Storage Account
  2. Select the File shares menu
  3. Click the button + File share. This opens the New file share blade
  4. Give the File share a Name
  5. Click Create

(Create an Azure Files share in the Azure portal)

When the Files share is created, click on it. This will show the details of the share, including its directories and files.

  1. Click Connect to start connecting the Files share
  2. By default, the blade is set to Windows, which is what we need to mount the share to Windows. Leave the settings as they are and copy the script

(Connect an Azure Files share)

  1. Open Notepad and paste the script in it
  2. Save the file as mount.ps1
  3. Open a PowerShell prompt
  4. Run the script with something like the code below (change the path to where you saved the file):
  1. The script will now try to connect to the Azure Files share and mount it to your computer. It will let you know if it runs into trouble. The most common error is that it can't connect to the Files share, because port 445 is closed. Make sure that port 445 is accessible
  2. The script will tell you that it executed successfully. The script also saved your credentials in your computer, so that it will automatically reconnect to the Files share when you restart the computer

(The script executed successfully)

  1. Open File Explorer. You should now see the Files share as a network drive. You can try it out by creating files and folders in it

(Azure Files share is now mounted as a network drive)

# Conclusion

Azure Files (opens new window) is a great way to store your data in the cloud, and keep it secure, redundant and performant. And by mounting an Azure Files share to your operating system, you can easily use it as your daily storage. Go and check it out!