Even though many businesses want to move to the cloud they are not ready (in many cases actually not willing) to adopt a move to a collaboration environment like SharePoint Online. In fact, I commonly hear the request that people want things “exactly they way they are now” but with “everything” in the cloud. Basically, they don’t want to change.
This typically means they want a mapped drive (say Z:) which appears in thieir file explorer and when navigated to contains all their files, just like their current on-premises file server. Now, this can be quite a challenge if they are moving to Office 365 for email but don’t want to move to SharePoint Online for file storage. As I have said many times, OneDrive for Business is NOT a good option at all as a replacement file server and neither is trying to use the OneDrive for Business sync client to copy large amounts of files to each desktop.
This requirement to access files and folders in the “old” way has driven many to competing products like Dropbox or Box but these products also have issues due to their syncing nature. I have been therefore looking for a suitable solution to this dilemma and believe I have now found a something.
Azure now allows you to set up SMB file shares that can be directly mapped on any workstation. Here’s how to do that.
You’ll need to navigate to the new Azure portal as shown above as this is the only place you can configure these SMB shares.
Once you have the new Azure portal open select New, then Data + Storage from the blade that appears and then Storage account as shown.
Select the Create button at the bottom of the page to create a new repository for files.
You’ll then need to complete the details for the storage account by giving it a name (lowercase and numbers only), a resource group (generally create a new one) and then finally a location where that will be housed. I’d also suggest you ensure the option to Pin to the dashboard is selected.
Once complete, select the Create button at the bottom of the page.
You should now see a new tile appear on your Azure dashboard as shown above. It will take a few minutes for the new storage account to be deployed. When it is, simply select this icon to configure.
Once you have selected the storage account you will see all the details as shown above. You’ll need to come back to this area but for now select the Files icon in the middle lower section of the blade.
Once the blade hat now appears you should see that you have no file shares configured. Select the banner You don’t have any shares. Click here to create one as shown above.
Give the share a name and an amount of space (or quota) and save the configuration.
You should now see this share listed in the properties of the Files service as shown above. Select this to view the properties.
A new blade should open and a number of options are displayed as buttons across the top as shown above. Select the first button, Connect.
This will now display the command line you will need to use on a workstation to map a drive letter directly to this new storage location. the format of this command is:
net use [drive letter] \\[storage account name].file.core.windows.net\ddshare /u:[storage account name] [storage account access key]
You’ll see how to get the storage account access key shortly but for now copy the string so it can be used later and then close this blade.
You should again see the buttons along the top. Select the Directory button and create as many top level directories as you want.
Here, two folders have been created, folder1 and folder2. You can also see from the button across the top that you can also upload files directly here if you wish, however to continue close this blade.
This should take you back to the properties of the storage account as shown above. Select the All settings link in the middle right of the page. This will display a blade of settings to the right.
From this list of settings, copy the value in one of the Access keys fields, here Key1.
If you now combine the access key you just copied with the earlier mapping command and run that on a workstation, as shown above, you should find a drive has been successfully mapped.
If you want to retain the credentials in the workstation so that mapping can take place automtically on reboot use this command:
cmdkey /add:[storage account name].file.core.windows.net /user:[storage account name] /pass:[storage account access key]
If you now take a look at your file explore you should see a mapped drive as shown above.
When you drill into that share you should see the any directories created in the Azure portal as shown.
So there you have it. Pretty easy eh? And with a bit of additional work, the mapped drive will persist after any reboot. Now users can use files and folders as they always did without realising that the storage is now in the cloud with all the benefits of Azure.
I’ll do some benchmark testing of the transfer speed of these Azure SMB shares comapred to other cloud storage methods and report back, so stay tuned for that shortly.
So, if you still want to do files and folders the old way, I think Azure SMB file shares is a great solution, especially with Office 365 because if you also have Azure AD Connect installed it can also copy your users identity to Azure making it even easier to integrate this all together or use it in hybrid mode if needed (prior to any full cloud migration say). Really makes you wonder if there is much reason any more for a file server on premises!
4 thoughts on “Creating an Azure SMB File Share”
But don’t you have to have TCP port 445 available? spectrum blocks my TCP 445.
Yes by default porta 445 outbound is required, however there are other methods, including using a VPN or like so – https://feedback.azure.com/forums/217298-storage/suggestions/15001032-allow-access-to-file-storage-configuration-to-use