Update-AzStorageFileServiceProperty
Modifies the service properties for the Azure Storage File service.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Update-AzStorageFileServiceProperty
[-ResourceGroupName] <String>
[-StorageAccountName] <String>
[-EnableShareDeleteRetentionPolicy <Boolean>]
[-ShareRetentionDays <Int32>]
[-EnableSmbMultichannel <Boolean>]
[-SmbProtocolVersion <String[]>]
[-SmbAuthenticationMethod <String[]>]
[-SmbChannelEncryption <String[]>]
[-SmbKerberosTicketEncryption <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzStorageFileServiceProperty
-StorageAccount <PSStorageAccount>
[-EnableShareDeleteRetentionPolicy <Boolean>]
[-ShareRetentionDays <Int32>]
[-EnableSmbMultichannel <Boolean>]
[-SmbProtocolVersion <String[]>]
[-SmbAuthenticationMethod <String[]>]
[-SmbChannelEncryption <String[]>]
[-SmbKerberosTicketEncryption <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzStorageFileServiceProperty
[-ResourceId] <String>
[-EnableShareDeleteRetentionPolicy <Boolean>]
[-ShareRetentionDays <Int32>]
[-EnableSmbMultichannel <Boolean>]
[-SmbProtocolVersion <String[]>]
[-SmbAuthenticationMethod <String[]>]
[-SmbChannelEncryption <String[]>]
[-SmbKerberosTicketEncryption <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Update-AzStorageFileServiceProperty cmdlet modifies the service properties for the Azure Storage File service.
Examples
Example 1: Enable File share softdelete
PS C:\> Update-AzStorageFileServiceProperty -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -EnableShareDeleteRetentionPolicy $true -ShareRetentionDays 5
StorageAccountName : mystorageaccount
ResourceGroupName : myresourcegroup
ShareDeleteRetentionPolicy.Enabled : True
ShareDeleteRetentionPolicy.Days : 5
ProtocolSettings.Smb.Multichannel.Enabled : False
ProtocolSettings.Smb.Versions :
ProtocolSettings.Smb.AuthenticationMethods :
ProtocolSettings.Smb.KerberosTicketEncryption :
ProtocolSettings.Smb.ChannelEncryption :
This command enables File share softdelete delete with retention days as 5
Example 2: Enable Smb Multichannel
PS C:\> Update-AzStorageFileServiceProperty -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -EnableSmbMultichannel $true
StorageAccountName : mystorageaccount
ResourceGroupName : myresourcegroup
ShareDeleteRetentionPolicy.Enabled : True
ShareDeleteRetentionPolicy.Days : 5
ProtocolSettings.Smb.Multichannel.Enabled : True
ProtocolSettings.Smb.Versions :
ProtocolSettings.Smb.AuthenticationMethods :
ProtocolSettings.Smb.KerberosTicketEncryption :
ProtocolSettings.Smb.ChannelEncryption :
This command enables Smb Multichannel, only supported on Premium FileStorage account.
Example 3: Updates secure smb settings
PS C:\> Update-AzStorageFileServiceProperty -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" `
-SMBProtocolVersion SMB2.1,SMB3.0,SMB3.1.1 `
-SMBAuthenticationMethod Kerberos,NTLMv2 `
-SMBKerberosTicketEncryption RC4-HMAC,AES-256 `
-SMBChannelEncryption AES-128-CCM,AES-128-GCM,AES-256-GCM
StorageAccountName : mystorageaccount
ResourceGroupName : myresourcegroup
ShareDeleteRetentionPolicy.Enabled : True
ShareDeleteRetentionPolicy.Days : 5
ProtocolSettings.Smb.Multichannel.Enabled : True
ProtocolSettings.Smb.Versions : {SMB2.1, SMB3.0, SMB3.1.1}
ProtocolSettings.Smb.AuthenticationMethods : {Kerberos, NTLMv2}
ProtocolSettings.Smb.KerberosTicketEncryption : {RC4-HMAC, AES-256}
ProtocolSettings.Smb.ChannelEncryption : {AES-128-CCM, AES-128-GCM, AES-256-GCM}
This command updates secure smb settings.
Example 4: Clear secure smb settings
PS C:\> Update-AzStorageFileServiceProperty -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" `
-SMBProtocolVersion @() `
-SMBAuthenticationMethod @() `
-SMBKerberosTicketEncryption @() `
-SMBChannelEncryption @()
StorageAccountName : mystorageaccount
ResourceGroupName : myresourcegroup
ShareDeleteRetentionPolicy.Enabled : True
ShareDeleteRetentionPolicy.Days : 5
ProtocolSettings.Smb.Multichannel.Enabled : True
ProtocolSettings.Smb.Versions :
ProtocolSettings.Smb.AuthenticationMethods :
ProtocolSettings.Smb.KerberosTicketEncryption :
ProtocolSettings.Smb.ChannelEncryption :
This command clears secure smb settings.
Parameters
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Enable share Delete Retention Policy for the storage account by set to $true, disable share Delete Retention Policy by set to $false.
| Type: | Boolean |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Enable Multichannel by set to $true, disable Multichannel by set to $false. Applies to Premium FileStorage only.
| Type: | Boolean |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Resource Group Name.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Input a Storage account Resource Id, or a File service properties Resource Id.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Sets the number of retention days for the share DeleteRetentionPolicy. The value should only be set when enable share Delete Retention Policy.
| Type: | Int32 |
| Aliases: | Days, RetentionDays |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gets or sets SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos.
| Type: | String[] |
| Accepted values: | Kerberos, NTLMv2 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gets or sets SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM.
| Type: | String[] |
| Accepted values: | AES-128-CCM, AES-128-GCM, AES-256-GCM |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gets or sets kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256.
| Type: | String[] |
| Accepted values: | AES-256, RC4-HMAC |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gets or sets SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1.
| Type: | String[] |
| Accepted values: | SMB2.1, SMB3.0, SMB3.1.1 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Storage account object
| Type: | PSStorageAccount |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Storage Account Name.
| Type: | String |
| Aliases: | AccountName, Name |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |