Update-AzRmStorageShare

Modifies a Storage file share.

Syntax

Update-AzRmStorageShare
      [-ResourceGroupName] <String>
      [-StorageAccountName] <String>
      -Name <String>
      [-QuotaGiB <Int32>]
      [-Metadata <Hashtable>]
      [-AccessTier <String>]
      [-RootSquash <String>]
      [-ProvisionedBandwidthMibps <Int32>]
      [-ProvisionedIops <Int32>]
      [-PaidBurstingEnabled <Boolean>]
      [-PaidBurstingMaxIops <Int32>]
      [-PaidBurstingMaxBandwidthMibps <Int32>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzRmStorageShare
      -Name <String>
      -StorageAccount <PSStorageAccount>
      [-QuotaGiB <Int32>]
      [-Metadata <Hashtable>]
      [-AccessTier <String>]
      [-RootSquash <String>]
      [-ProvisionedBandwidthMibps <Int32>]
      [-ProvisionedIops <Int32>]
      [-PaidBurstingEnabled <Boolean>]
      [-PaidBurstingMaxIops <Int32>]
      [-PaidBurstingMaxBandwidthMibps <Int32>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzRmStorageShare
      [-ResourceId] <String>
      [-QuotaGiB <Int32>]
      [-Metadata <Hashtable>]
      [-AccessTier <String>]
      [-RootSquash <String>]
      [-ProvisionedBandwidthMibps <Int32>]
      [-ProvisionedIops <Int32>]
      [-PaidBurstingEnabled <Boolean>]
      [-PaidBurstingMaxIops <Int32>]
      [-PaidBurstingMaxBandwidthMibps <Int32>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzRmStorageShare
      -InputObject <PSShare>
      [-QuotaGiB <Int32>]
      [-Metadata <Hashtable>]
      [-AccessTier <String>]
      [-RootSquash <String>]
      [-ProvisionedBandwidthMibps <Int32>]
      [-ProvisionedIops <Int32>]
      [-PaidBurstingEnabled <Boolean>]
      [-PaidBurstingMaxIops <Int32>]
      [-PaidBurstingMaxBandwidthMibps <Int32>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The New-AzRmStorageShare cmdlet modifies a Storage file share.

Examples

Example 1: Modifies a Storage file share's metadata and share quota with Storage account name and share name

$share = Update-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -QuotaGiB 200 -Metadata @{tag0="value0";tag1="value1"}

$share

   ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount

Name     QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes
----     -------- ---------------- ---------- ------- ------- ---------------
myshare  200

$share.Metadata

Key  Value  
---  ----- 
tag0 value0
tag1 value1

This command modifies a Storage file share's metadata and share quota with Storage account name and share name, and show the modify result with the returned file share object.

Example 2: Modifies metadata on a Storage file share with Storage account object and share name

$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -StorageAccountName "myStorageAccount"
$share = Update-AzRmStorageShare -StorageAccount $accountObject -Name "myshare" -Metadata @{tag0="value0";tag1="value1"}

This command modifies metadata on a Storage file share with Storage account object and share name.

Example 3: Modifies share quota for all Storage file shares in a Storage account with pipeline

Get-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" | Update-AzRmStorageShare -QuotaGiB 5000

ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount

Name     QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes
----     -------- ---------------- ---------- ------- ------- ---------------
share1   5000
share2   5000

This command modifies share quota as 5000 GiB for all Storage file shares in a Storage account with pipeline.

Example 4: Modify a Storage file share with accesstier as Cool

$share = Update-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -AccessTier Cool

ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount

Name     QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes
----     -------- ---------------- ---------- ------- ------- ---------------
myshare                            Cool

This command modifies a Storage file share with accesstier as Cool.

Example 5: Modifies rootsquash for a file shares in a Storage account

$share = Update-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -RootSquash NoRootSquash 

$share

   ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount

Name     QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes
----     -------- ---------------- ---------- ------- ------- ---------------
myshare  

$share.RootSquash
NoRootSquash

This command modifies share RootSquash property to NoRootSquash. RootSquash property is only avaialbe on share with EnabledProtocol as NFS.

Example 6: Modifies a Storage file share with provisioned bandwidth and IOPS

New-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -ProvisionedBandwidthMibps 129 -ProvisionedIops 3032

This command modifies a Storage file share with provisioned bandwidth and IOPS, it only work on Files Provisioned v2 account type.

Example 7: Modifies a Storage file share with paid bursting bandwidth and IOPS

New-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -PaidBurstingEnabled -PaidBurstingMaxBandwidthMibps 129 -PaidBurstingMaxIops 3032

This command modifies a Storage file share with paid bursting bandwidth and IOPS, it only work on Files Provisioned v1 account type.

Parameters

-AccessTier

Access tier for specific share. StorageV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.

Type:String
Accepted values:TransactionOptimized, Premium, Hot, Cool
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Storage Share object

Type:PSShare
Aliases:Share
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Metadata

Share Metadata

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Share Name

Type:String
Aliases:N, ShareName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PaidBurstingEnabled

Indicates whether paid bursting is enabled for the share. This property is only for file shares created under Files Provisioned v1 SSD account type.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PaidBurstingMaxBandwidthMibps

The maximum paid bursting bandwidth for the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed value is 10340 which is the maximum allowed bandwidth for a share.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PaidBurstingMaxIops

The maximum paid bursting IOPS for the share. This property is only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed value is 102400 which is the maximum allowed IOPS for a share.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProvisionedBandwidthMibps

The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the Get-AzStorageFileServiceUsage cmdlet output for the minimum and maximum allowed value for provisioned bandwidth.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProvisionedIops

The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the Get-AzStorageFileServiceUsage cmdlet output for the minimum and maximum allowed value for provisioned IOPS.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-QuotaGiB

Share Quota in Gibibyte.

Type:Int32
Aliases:Quota
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Resource Group Name.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

Input a File Share Resource Id.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-RootSquash

Sets reduction of the access rights for the remote superuser. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash'

Type:String
Accepted values:NoRootSquash, RootSquash, AllSquash
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccount

Storage account object

Type:PSStorageAccount
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-StorageAccountName

Storage Account Name.

Type:String
Aliases:AccountName
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Outputs