Azure Storage - Create File Storage In Azure And Mount The File Share To The VM

Step 1

Create File Share.

To create File Share, you have to create the Storage Account. If you don’t know how, please go to this link and create the Storage Account.

Select the Storage Account and choose the Files Service in it.



Click Plus sign (+) to create File Share.



Give the name for File Share and set the Quota in GB, up to 5120 GB, to limit the total size of files on the share.



Click the create button and it will create the File share.



Step 2

Upload Files.

Click upload to open the UI for file uploading.


Click Start Upload to upload the files.





Step 3

Download files.

Choose the file and click download to download the file.



Step 4


Create VM.

Create the VM by using the Portal, if you don’t know, how to create, please go to this link and create VM.

Step 5

Install PowerShell on VM.

Go to this link and install the powershell on VM.

Step 6

Mount the File Share to the VM.

Open Window PowerShell ISE.



Step 7

Persist your storage Account Credentials for the VM.

To persist your account credentials, run the cmdkey command from the PowerShell window on the virtual machine.

<storage-account-name>: Name of your storage account.
<Storage-account-key>: Your storage account key.

Use this command,

cmdkey /add:<storage-account-name>.file.core.windows.net /user:<storage-account-name> /pass:<storage-account-key>



Step 8


Mount the File Share using the persisted credentials.

Run the net use command to mount the file share, using the following syntax. <storage-account-name>: name of your storage account.

<share-name>: name of your File storage share.

Use this command.

net use <drive-letter>: \\<storage-account-name>.file.core.windows.net\<share-name>



Now, you can see the mounted file share in your Network Locations.