Mapping an Azure file share to a local Windows machine allows you to access cloud storage exactly like a traditional network drive. This integration means you can interact with your cloud files directly through Windows File Explorer using a familiar drive letter. The setup process relies on the Server Message Block (SMB) protocol, which securely transmits data over the internet.
Before starting, ensure that your local network allows outbound traffic over port 445. Many internet service providers (ISPs) block this port by default for security reasons. If port 445 is restricted, your connection to Azure Files will fail unless you set up a VPN or an Azure File Sync configuration.
Step 1: Retrieve Your Connection Credentials
To map the drive, you must first gather the specific network path and access keys from the Azure portal.
- Log in to the Azure Portal and navigate to your Storage Account.
- From the left-hand menu, select File shares under the Data Storage section and click on the specific share you want to map.
- Click the Connect button at the top of the interface.
- In the configuration panel that appears on the right, select Windows as your operating system.
- Choose your preferred drive letter (for example,
Z:).
- Azure will automatically generate a custom PowerShell script containing your storage account name, file share name, and secure access key. Click the copy icon to save this entire script block to your clipboard.
Step 2: Run the Connection Script on Windows
Using the automated script provided by Azure is the fastest and most reliable way to configure the drive mapping, as it automatically tests network port availability before creating the connection.
- Right-click the Windows Start menu button and select Terminal or PowerShell.
- Paste the copied script into the PowerShell window and press Enter.
- The script will run a quick validation check on port 445. If the port is open, it will instantly mount the Azure file share to your chosen drive letter.
If the script returns a network connectivity error during execution, verify your firewall settings or check with your network administrator to confirm that outbound traffic over port 445 is permitted.
Step 3: Access Your Cloud Storage via File Explorer
Once the PowerShell script completes successfully, you can begin using your cloud storage immediately.
- Open File Explorer on your Windows machine.
- Click on This PC in the left-hand navigation pane.
- Look under the Network locations section; you will see your new Azure file share listed with the drive letter you selected.
Any file you create, edit, or drop into this folder will sync instantly to the cloud, making it accessible to other authorized users or systems connected to that same Azure storage resource. If you ever need to remove the drive, simply right-click the network folder inside File Explorer and select Disconnect.