Skip to content

Latest commit

 

History

History
468 lines (325 loc) · 23.4 KB

File metadata and controls

468 lines (325 loc) · 23.4 KB
title Modify an Azure File Share
titleSuffix Azure Files
description Learn how to adjust the size, cost, and performance characteristics of Azure file shares by using the Azure portal, Azure PowerShell, or Azure CLI.
author khdownie
ms.service azure-file-storage
ms.topic how-to
ms.date 03/17/2026
ms.author kendownie
ms.custom devx-track-azurecli, devx-track-azurepowershell

How to modify an Azure file share

✔️ Applies to: Classic SMB and NFS file shares created with the Microsoft.Storage resource provider

✔️ Applies to: File shares created with the Microsoft.FileShares resource provider (preview)

This article explains how to adjust the size, cost, and performance characteristics of Azure file shares using the Azure portal, Azure PowerShell, and Azure CLI. The procedures are different for classic file shares, which use the Microsoft.Storage resource provider, versus file shares created with Microsoft.FileShares (preview).

Change the cost and performance characteristics of a classic file share

After creating your classic file share, you might need to adjust the provisioning (provisioned models) or access tier (pay-as-you-go model) of the share. The following sections show you how to adjust the relevant properties for your share.

Change the cost and performance characteristics of a provisioned v2 classic file share

After creating your provisioned v2 classic file share, you can change one or all three of the provisioned quantities of your file share. The amount of storage, IOPS, and throughput you provision can be dynamically scaled up or down as your needs change. However, you can only decrease a provisioned quantity after 24 hours have elapsed since your last quantity increase. Storage, IOPS, and throughput changes are effective within a few minutes after a provisioning change.

Follow these instructions to update the provisioning for your file share.

  1. Go to your storage account. From the service menu, under Data storage, select File shares.

  2. In the file share listing, select the file share for which you desire to change the provisioning.

  3. In the file share overview, select Change size and performance.

    A screenshot of the "Change size and performance" button in the file share overview.

  4. The Size and performance pop out dialog has the following options:

    A screenshot of the "Size and performance" pop out dialog.

    • Provisioned storage (GiB): The amount of storage provisioned on the share.

    • Provisioned IOPS and throughput: A radio button group that lets you select between Recommended provisioning and Manually specify IOPS and throughput. If your share is at the recommended IOPS and throughput level for the amount of storage provisioned, Recommended provisioning will be selected; otherwise, Manually specify IOPS and throughput will be selected. You can toggle between these two options depending on your desire to change share provisioning.

      • IOPS: If you select Manually specify IOPS and throughput, this textbox enables you to change the amount of IOPS provisioned on this file share.

      • Throughput (MiB/sec): If you select Manually specify IOPS and throughput, this textbox enables you to change the amount of throughput provisioned on this file share.

  5. Select Save to save provisioning changes. Storage, IOPS, and throughput changes are effective within a few minutes after a provisioning change.

You can modify a provisioned v2 file share with the Update-AzRmStorageShare cmdlet. Remember to replace the values for the variables $resourceGroupName, $storageAccountName, $shareName, $provisionedThroughputMibPerSec, $provisionedIops, and $provisionedStorageGib with the desired values for your file share.

# The path to the file share resource to be modified.
$resourceGroupName = "<my-resource-group>"
$storageAccountName = "<my-storage-account-name>"
$shareName = "<name-of-the-file-share>"
# The provisioning desired on the file share. Delete the parameters if no
# change is desired.
$provisionedStorageGib = 10240
$provisionedIops = 10000
$provisionedThroughputMibPerSec = 2048
# Update the file share provisioning.
Update-AzRmStorageShare `
        -ResourceGroupName $resourceGroupName `
        -AccountName $storageAccountName `
        -ShareName $shareName `
        -QuotaGiB $provisionedStorageGib `
        -ProvisionedIops $provisionedIops `
        -ProvisionedBandwidthMibps $provisionedThroughputMibPerSec
$f = Get-AzRmStorageShare -ResourceGroupName $resourceGroupName -AccountName $storageAccountName -ShareName $shareName
$f | fl

You can modify a provisioned v2 file share with the az storage share-rm update command. Remember to replace the values for the variables resourceGroupName, storageAccountName, fileShareName, provisionedStorageGib, provisionedIops, and provisionedThroughputMibPerSec with the desired values for your file share.

# The path to the file share resource to be modified.
resourceGroupName="<resource-group>"
storageAccountName="<storage-account>"
fileShareName="<file-share>"

# The provisioning desired on the file share. Delete the parameters if no
# change is desired.
provisionedStorageGib=10240
provisionedIops=10000
provisionedThroughputMibPerSec=2048

# Update the file share provisioning.
az storage share-rm update \
        --resource-group $resourceGroupName \
        --name $shareName \
        --storage-account $storageAccountName \
        --quota $provisionedStorageGib \
        --provisioned-iops $provisionedIops \
        --provisioned-bandwidth-mibps $provisionedThroughputMibPerSec

Change the cost and performance characteristics of a provisioned v1 classic file share

After creating your provisioned v1 file share, you can change the provisioned storage size of the file share. Changing the provisioned storage of the share will also change the amount of provisioned IOPS and provisioned throughput. You can only decrease the provisioned storage after 24 hours have elapsed since your last storage increase. Storage, IOPS, and throughput changes are effective within a few minutes after a provisioning change. For more information, see provisioned v1 provisioning detail.

Follow these instructions to update the provisioning for your file share.

  1. Go to your storage account. From the service menu, under Data storage, select File shares.

  2. In the file share listing, select the file share for which you desire to change the provisioning.

  3. In the file share overview select Change size and performance.

    A screenshot of the "Change size and performance" button in the file share overview.

  4. The Size and performance pop out dialog has a single option, Provisioned storage (GiB). If you require more IOPS or throughput than the given amount of provisioned storage provides, you can increase your provisioned storage capacity to get additional IOPS and throughput.

    A screenshot of the "Size and performance" dialog for provisioned v1 file shares.

  5. Select Save to save provisioning changes. Storage, IOPS, and throughput changes are effective within a few minutes after a provisioning change.

Note

You can use PowerShell and CLI to enable/disable paid bursting if desired. Paid bursting is an advanced feature of the provisioned v1 billing model. See provisioned v1 paid bursting before enabling paid bursting.

You can modify a provisioned v1 file share with the Update-AzRmStorageShare cmdlet. Remember to replace the values for the variables $resourceGroupName, $storageAccountName, and $fileShareName with the desired values for your file share. Set $provisionedStorageGib, $paidBurstingEnabled, $paidBurstingMaxIops, and $paidBurstingMaxThroughputMibPerSec to non-null ($null) values on the file share. Paid bursting is an advanced feature of the provisioned v1 model. See provisioned v1 paid bursting before enabling.

# The path to the file share resource to be modified.
$resourceGroupName = "<resource-group>"
$storageAccountName = "<storage-account>"
$fileShareName = "<file-share>"
# The provisioning desired on the file share. Set to $null to keep at the
# current level of provisioning.
$provisionedStorageGib = 10240
# Paid bursting settings.
$paidBurstingEnabled = $null # Set to $true or $false.
$paidBurstingMaxIops = $null # Set to an integer value.
$paidBurstingMaxThroughputMibPerSec = $null # Set to an integer value.
# Configure parameter object for splatting.
$params = @{
    ResourceGroupName = $resourceGroupName;
    StorageAccountName = $storageAccountName;
    Name = $fileShareName;
}
if ($null -ne $provisionedStorageGib) {
    $params += @{ QuotaGiB = $provisionedStorageGib }
}
if ($null -ne $paidBurstingEnabled) {
    $params += @{ PaidBurstingEnabled = $paidBurstingEnabled }
}
if ($null -ne $paidBurstingMaxIops) {
    $params += @{ PaidBurstingMaxIops = $paidBurstingMaxIops }
}
if ($null -ne $paidBurstingMaxThroughputMibPerSec) {
    $params += @{
        PaidBurstingMaxBandwidthMibps = $paidBurstingMaxThroughputMibPerSec
    }
}
# Update the file share provisioning.
Update-AzRmStorageShare @params

You can modify a provisioned v1 file share with the az storage share-rm update command. Remember to replace the values for the variables resourceGroupName, storageAccountName, fileShareName, and provisionedStorageGib with the desired values for your file share.

# The path to the file share resource to be modified.
resourceGroupName="<resource-group>"
storageAccountName="<storage-account>"
fileShareName="<file-share>"

# The provisioning desired on the file share.
provisionedStorageGib=10240

# Update the file share provisioning.
az storage share-rm update \
        --resource-group $resourceGroupName \
        --storage-account $storageAccountName \
        --name $fileShareName \
        --quota $provisionedStorageGib

To toggle paid bursting, use the --paid-bursting-enabled parameter. Paid bursting is an advanced feature of the provisioned v1 model. See provisioned v1 paid bursting before enabling. You can optionally use the --paid-bursting-max-iops and --paid-bursting-max-bandwidth-mibps flags to set a restriction on the upper amount of paid bursting allowed for cost control purposes. Remember to replace the values for the variables resourceGroupName, storageAccountName, and fileShareName with the desired values for your file share.

resourceGroupName="<resource-group>"
storageAccountName="<storage-account>"
fileShareName="<file-share>"

az storage share-rm update \
        --resource-group $resourceGroupName \
        --storage-account $storageAccountName \
        --name $fileShareName \
        --paid-bursting-enabled true

Change the cost and performance characteristics of a pay-as-you-go classic file share

After you've created your pay-as-you-go file share, there are two properties you might want to change:

  • Access tier: The access tier of the file share dictates to the ratio of storage to IOPS/throughput costs (in the form of transactions). There are three access tiers: transaction optimized, hot, and cool. Changing the tier of the Azure file share results in transaction costs for the movement to the new access tier. For more information, see switching between access tiers.

  • Quota: Quota is a limit on the size of the file share. The quota property is used in the provisioned v2 and provisioned v1 models to mean "provisioned storage capacity", however, in the pay-as-you-go model, quota has no direct impact on billing. The two primary reasons you might want to modify this are if you use quota to limit the growth of your file share to keep control of the used storage/transaction costs in the pay-as-you-go model, or if you have a storage account predating the introduction of the large file share feature, which enabled file shares to grow beyond 5 TiB. The maximum file share size for a pay-as-you-go file share is 100 TiB.

Follow these instructions to update the access tier of your file share using the Azure portal.

  1. Go to your storage account. From the service menu, under Data storage, select File shares.

  2. In the file share listing, select the file share for which you desire to change the access tier.

  3. In the file share overview, select Change tier.

  4. Select the desired Access tier from the provided drop-down list.

  5. Select Apply to save the access tier change.

For these instructions to update the quota of your file share.

  1. Go to your storage account. From the service menu, under Data storage, select File shares.

  2. In the file share listing, select the file share for which you desire to change the quota.

  3. In the file share overview, select Edit quota.

  4. In the edit quota pop-out, enter the desired maximum size of the share or select Set to maximum. There is no cost implication of setting the share to the maximum size.

  5. Select OK to save quota changes. The new quota is effective within a few minutes.

You can modify the access tier and quota settings of a pay-as-you-go file share with the Update-AzRmStorageShare cmdlet. Remember to replace the values for the variables $resourceGroupName, $storageAccountName, $fileShareName, $accessTier, and $quotaGib with the desired values for your file share.

# The path to the file share resource to be modified.
$resourceGroupName = "<resource-group>"
$storageAccountName = "<storage-account>"
$fileShareName = "<file-share>"
# The settings to be changed on the file share. Set to $null to skip setting.
$accessTier = "Cool"
$quotaGib = $null
# Construct a parameters hash table for cmdlet splatting.
$updateParams = @{
    ResourceGroupName = $resourceGroupName
    StorageAccountName = $storageAccountName
    Name = $fileShareName
}
if ($null -ne $accessTier) { $updateParams += @{ AccessTier = $accessTier } }
if ($null -ne $quotaGib) { $updateParams += @{ QuotaGiB = $quotaGib } }
# Update the file share
Update-AzRmStorageShare @updateParams

You can modify the access tier and quota settings of a pay-as-you-go file share with the az storage share-rm update command. Remember to replace the values for the variables resourceGroupName, storageAccountName, fileShareName, accessTier, and quotaGib with the desired values for your file share.

# The path to the file share resource to be modified.
resourceGroupName="<resource-group>"
storageAccountName="<storage-account>"
fileShareName="<file-share>"

# The settings to be changed on the file share. Set to the empty string to skip
# setting.
accessTier="Cool"
quotaGib=""

command="az storage share-rm update --resource-group $resourceGroupName"
command="$command --storage-account $storageAccountName --name $fileShareName"

if [ ! -z "${accessTier}" ]; then
    command="$command --access-tier $accessTier"
fi

if [ ! -z "${quotaGib}" ]; then
    command="$command --quota $quotaGib"
fi

# Update file share (command is in variable)
$command

Change the cost and performance characteristics of a file share (Microsoft.FileShares)

Follow these instructions to change the size and performance of a file share (Microsoft.FileShares) using the Azure portal. The amount of storage, IOPS, and throughput you provision can be dynamically scaled up or down as your needs change. However, you can only decrease a provisioned quantity after 24 hours have elapsed since your last quantity increase. Storage, IOPS, and throughput changes are effective within a few minutes after a provisioning change.

  1. Select the file share you want to modify.

  2. From the context menu, select Settings.

  3. Choose Size + performance.

    image on choosing size and performance for a file share created with Microsoft.FileShares

  4. The Size and performance dialog has the following options:

    • Provisioned capacity (GiB): The amount of storage provisioned on the share.

    • Provisioned IOPS and throughput: A radio button group that lets you select between Recommended provisioning and Manually specify IOPS and throughput. If your share is at the recommended IOPS and throughput level for the amount of storage provisioned, Recommended provisioning will be selected; otherwise, Manually specify IOPS and throughput will be selected. You can toggle between these two options to change share provisioning.

    • IOPS: If you select Manually specify IOPS and throughput, this textbox enables you to change the amount of IOPS provisioned on this file share.

    • Throughput (MiB/sec): If you select Manually specify IOPS and throughput, this textbox enables you to change the amount of throughput provisioned on the file share.

    image on saving new size for a file share created with Microsoft.FileShares

  5. Select Save. Storage, IOPS, and throughput changes are effective within a few minutes after a provisioning change.

To change the size and performance of a file share (Microsoft.FileShares) using PowerShell, use the following commands. Be sure to replace the variables with your intended values.

# To learn more about the Az.FileShare module, see https://www.powershellgallery.com/packages/Az.FileShare/0.1.0
Install-Module -Name Az.FileShare -Repository psgallery -RequiredVersion 0.1.0

$resourceGroup = "<resource-group>"
$shareName = "<file-share-name>"

Update-AzFileShare -ResourceName $shareName -ResourceGroupName $resourceGroup # following is an example to modify the file share setting, edit command to tailor for your need: "-NfProtocolPropertyRootSquash RootSquash -ProvisionedIoPerSec 5001 -ProvisionedStorageGiB 101 -ProvisionedThroughputMiBPerSec 126 -PublicNetworkAccess Disabled -Tag @{tag1="value1"}"
Get-AzFileShare -ResourceGroupName $resourceGroup -ResourceName $shareName

To change the size and performance of a file share (Microsoft.FileShares) using Azure CLI, use the following commands.

az resource update \
  --resource-type "Microsoft.FileShares/fileShares" \
  --name <your-file-share-name> \
  --resource-group <your-resource-group-name> \
  --set properties.provisionedStorageGiB=<intended capacity> \
       properties.ProvisionedIoPerSec=<intended IOPS> \
       properties.ProvisionedThroughputMiBPerSec=<intended througphput> \
       properties.nfsProtocolProperties.rootSquash="AllSquash"

To check file share information:

az resource show \
  --resource-type "Microsoft.FileShares/fileShares" \
  --name <your-file-share-name> \
  --resource-group <your-resource-group-name>

Delete a classic file share

You might want to delete unused or outdated file shares. File shares in storage accounts with soft delete enabled can be recovered within the retention period.

Follow these instructions to delete a classic file share using the Azure portal.

  1. Go to your storage account. From the service menu, under Data storage, select File shares.

  2. In the file share list, select the ... for the file share you want to delete.

  3. Select Delete share from the context menu.

  4. The Delete pop-out contains a survey about why you're deleting the file share. You can skip this, but we appreciate any feedback you have on Azure Files, particularly if something isn't working properly for you.

  5. Enter the file share name to confirm deletion and then select Delete.

You can delete a file share using the Remove-AzRmStorageShare cmdlet. Remember to replace the values for the variables $resourceGroupName, $storageAccountName, and $fileShareName with the desired values for your file share.

# The path to the file share resource to be deleted.
$resourceGroupName = "<resource-group>"
$storageAccountName = "<storage-account>"
$fileShareName = "<file-share>"
# Remove the file share
Remove-AzRmStorageShare `
        -ResourceGroupName $resourceGroupName `
        -StorageAccountName $storageAccountName `
        -Name $fileShareName

You can delete a file share using the az storage share-rm delete command. Remember to replace the values for the variables resourceGroupName, storageAccountName, and fileShareName with the desired values for your file share.

resourceGroupName="<resource-group>"
storageAccountName="<storage-account>"
fileShareName="<file-share>"

az storage share-rm delete \
    --resource-group $resourceGroupName \
    --storage-account $storageAccountName \
    --name $fileShareName

Delete a file share (Microsoft.FileShares)

Before deleting your file share created with the Microsoft.FileShares resource provider, make sure to delete its associated private endpoint. File share deletion will fail if the private endpoint is still present.

To delete a file share (Microsoft.FileShares) using the Azure portal, follow these steps.

  1. Go to your file share.

  2. Select Delete from the context menu.

    Delete image

  3. The Delete pop-out contains a survey about why you're deleting the file share. You can skip this, but we appreciate any feedback you have, particularly if something isn't working properly for you.

  4. Enter the file share name to confirm deletion and then select Delete.

To delete a file share (Microsoft.FileShares) using PowerShell, run the following command. Be sure to replace the variables with your intended values.

# To learn more about the Az.FileShare module, see https://www.powershellgallery.com/packages/Az.FileShare/0.1.0
Install-Module -Name Az.FileShare -Repository psgallery -RequiredVersion 0.1.0

$resourceGroup = "<resource-group>"
$shareName = "<file-share-name>"

Remove-AzFileShare -ResourceName $shareName -ResourceGroupName $resourceGroup

To delete a file share (Microsoft.FileShares) using Azure CLI, run the following command.

az resource delete \
  --resource-type "Microsoft.FileShares/fileShares" \
  --name <your-file-share-name> \
  --resource-group <your-resource-group-name>

Next steps