Azure Files is Microsoft's easy-to-apply cloud file system. Azure file shares can exist mounted in Windows, Linux, and macOS. This guide shows you how to create an SMB Azure file share using either the Azure portal, Azure CLI, or Azure PowerShell module.

Applies to

File share type SMB NFS
Standard file shares (GPv2), LRS/ZRS Yes No
Standard file shares (GPv2), GRS/GZRS Yes No
Premium file shares (FileStorage), LRS/ZRS Yes No

Pre-requisites

  • Portal
  • PowerShell
  • Azure CLI

If you lot don't take an Azure subscription, create a free account before y'all begin.

Create a storage account

  • Portal
  • PowerShell
  • Azure CLI

A storage account is a shared pool of storage in which you tin deploy an Azure file share or other storage resources, such as blobs or queues. A storage account can contain an unlimited number of shares. A share can store an unlimited number of files, up to the capacity limits of the storage account.

To create a storage account using the Azure portal:

  1. Under Azure services, select + to create a resources.

  2. Select Storage account to create a storage account.

    A screenshot of the storage account option in the create a resource blade.

  3. Under Project details, select the Azure subscription in which to create the storage account. If you have just ane subscription, it should be the default.

  4. Select Create new to create a new resource grouping. For the name, enter myResourceGroup.

  5. Under Instance details, provide a name for the storage business relationship such as mystorageacct followed by a few random numbers to make it a globally unique name. A storage business relationship proper name must be all lowercase and numbers, and must exist between 3 and 24 characters. Make a note of your storage account proper noun. Yous will use it later on.

  6. In Region, select East United states of america.

  7. In Performance, go along the default value of Standard.

  8. In Redundancy, select Locally redundant storage (LRS).

    Screenshot showing how to enter the project and instance details for a storage account using the Azure portal.

  9. Select Review + Create to review your settings and create the storage account.

  10. When you lot see the Validation passed notification, select Create. You lot should run into a notification that deployment is in progress.

  • Portal
  • PowerShell
  • Azure CLI

To create an Azure file share:

  1. Select the storage account from your dashboard.

  2. On the storage account page, in the Services section, select Files.

    A screenshot of the data storage section of the storage account; select file shares.

  3. On the menu at the pinnacle of the File service folio, click + File share. The New file share page drops downwards.

  4. In Proper noun type myshare. Leave Transaction optimized selected for Tier.

  5. Select Create to create the Azure file share.

Share names must be all lower case letters, numbers, and single hyphens but cannot start with a hyphen. For consummate details well-nigh naming file shares and files, come across Naming and Referencing Shares, Directories, Files, and Metadata.

Create a directory

  • Portal
  • PowerShell
  • Azure CLI

To create a new directory named myDirectory at the root of your Azure file share:

  1. On the File share settings page, select the myshare file share. The folio for your file share opens, indicating no files constitute.
  2. On the carte at the pinnacle of the page, select + Add together directory. The New directory folio drops downward.
  3. Type myDirectory and then click OK.

Upload a file

  • Portal
  • PowerShell
  • Azure CLI

To demonstrate uploading a file, you lot first need to create or select a file to be uploaded. You may exercise this by whatever means you see fit. In one case you lot've decided on the file you would like to upload:

  1. Select the myDirectory directory. The myDirectory panel opens.

  2. In the menu at the height, select Upload. The Upload files panel opens.

    A screenshot of the upload files panel

  3. Select the folder icon to open a window to browse your local files.

  4. Select a file and and then select Open.

  5. In the Upload files page, verify the file name and then select Upload.

  6. When finished, the file should appear in the list on the myDirectory page.

Download a file

  • Portal
  • PowerShell
  • Azure CLI

You can download a copy of the file you lot uploaded past right-clicking on the file and selecting Download. The exact experience volition depend on the operating organisation and browser yous're using.

Clean upwardly resources

  • Portal
  • PowerShell
  • Azure CLI

When you're done, delete the resource group. Deleting the resource group deletes the storage account, the Azure file share, and any other resource that y'all deployed inside the resources group.

  1. Select Home and and so Resource groups.
  2. Select the resource group you desire to delete.
  3. Select Delete resources grouping. A window opens and displays a warning about the resources that will be deleted with the resources group.
  4. Enter the proper name of the resource group, so select Delete.

Next steps