Update-AzStorageFileServiceProperty

Azure Storage 파일 서비스의 서비스 속성을 수정합니다.

Syntax

Update-AzStorageFileServiceProperty
      [-ResourceGroupName] <String>
      [-StorageAccountName] <String>
      [-EnableShareDeleteRetentionPolicy <Boolean>]
      [-ShareRetentionDays <Int32>]
      [-EnableSmbMultichannel <Boolean>]
      [-SmbProtocolVersion <String[]>]
      [-SmbAuthenticationMethod <String[]>]
      [-SmbChannelEncryption <String[]>]
      [-SmbKerberosTicketEncryption <String[]>]
      [-CorsRule <PSCorsRule[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzStorageFileServiceProperty
      -StorageAccount <PSStorageAccount>
      [-EnableShareDeleteRetentionPolicy <Boolean>]
      [-ShareRetentionDays <Int32>]
      [-EnableSmbMultichannel <Boolean>]
      [-SmbProtocolVersion <String[]>]
      [-SmbAuthenticationMethod <String[]>]
      [-SmbChannelEncryption <String[]>]
      [-SmbKerberosTicketEncryption <String[]>]
      [-CorsRule <PSCorsRule[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzStorageFileServiceProperty
      [-ResourceId] <String>
      [-EnableShareDeleteRetentionPolicy <Boolean>]
      [-ShareRetentionDays <Int32>]
      [-EnableSmbMultichannel <Boolean>]
      [-SmbProtocolVersion <String[]>]
      [-SmbAuthenticationMethod <String[]>]
      [-SmbChannelEncryption <String[]>]
      [-SmbKerberosTicketEncryption <String[]>]
      [-CorsRule <PSCorsRule[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Update-AzStorageFileServiceProperty cmdlet은 Azure Storage 파일 서비스의 서비스 속성을 수정합니다.

예제

예제 1: 파일 공유 일시 삭제 사용

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        :

이 명령을 사용하면 보존 기간이 5일인 파일 공유 일시 삭제를 사용할 수 있습니다.

예제 2: Smb 다중 채널 사용

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        :

이 명령은 프리미엄 FileStorage 계정에서만 지원되는 Smb 다중 채널을 사용하도록 설정합니다.

예제 3: 보안 smb 설정 업데이트

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}

이 명령은 보안 smb 설정을 업데이트합니다.

예제 4: 보안 smb 설정 지우기

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        :

이 명령은 보안 smb 설정을 지웁니다.

예제 5: CORS 규칙 업데이트

$CorsRules = (@{
    AllowedHeaders=@("x-ms-blob-content-type","x-ms-blob-content-disposition");
    ExposedHeaders=@(); 
    AllowedOrigins=@("*");
    AllowedMethods=@("TRACE","CONNECT")},
    @{
    AllowedOrigins=@("http://www.fabrikam.com","http://www.contoso.com"); 
    ExposedHeaders=@("x-ms-meta-data*","x-ms-meta-customheader"); 
    AllowedHeaders=@("x-ms-meta-target*","x-ms-meta-customheader");
    MaxAgeInSeconds=30;
    AllowedMethods=@("PUT")})

$property = Update-AzStorageFileServiceProperty -ResourceGroupName myresourcegroup -StorageAccountName mystorageaccount -CorsRule $CorsRules
$property.Cors.CorsRulesProperty

AllowedOrigins  : {*}
AllowedMethods  : {TRACE, CONNECT}
MaxAgeInSeconds : 0
ExposedHeaders  : {}
AllowedHeaders  : {x-ms-blob-content-type, x-ms-blob-content-disposition}

AllowedOrigins  : {http://www.fabrikam.com, http://www.contoso.com}
AllowedMethods  : {PUT}
MaxAgeInSeconds : 30
ExposedHeaders  : {x-ms-meta-customheader, x-ms-meta-data*}
AllowedHeaders  : {x-ms-meta-customheader, x-ms-meta-target*}

첫 번째 명령은 규칙 배열을 $CorsRules 변수에 할당합니다. 이 명령은 이 코드 블록의 여러 줄에 걸쳐 표준 확장을 사용합니다. 두 번째 명령은 $CorsRules 규칙을 Storage 계정의 파일 서비스로 설정합니다.

예제 6: CORS 규칙 정리

Update-AzStorageFileServiceProperty -ResourceGroupName myresourcegroup -StorageAccountName mystorageaccount -CorsRule @()

이 명령은 매개 변수 CorsRule에 @()를 입력하여 스토리지 계정의 CORS 규칙을 클린.

매개 변수

-Confirm

cmdlet을 실행하기 전에 확인 메시지가 표시됩니다.

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

-CorsRule

파일 서비스에 대한 CORS 규칙을 지정합니다.

Type:PSCorsRule[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

Azure와의 통신에 사용되는 자격 증명, 계정, 테넌트 및 구독입니다.

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

-EnableShareDeleteRetentionPolicy

$true 설정하여 스토리지 계정에 대한 공유 삭제 보존 정책을 사용하도록 설정하고, $false 설정하여 공유 삭제 보존 정책을 사용하지 않도록 설정합니다.

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

-EnableSmbMultichannel

$true 설정하여 다중 채널을 사용하도록 설정하고, $false 설정하여 다중 채널을 사용하지 않도록 설정합니다. 프리미엄 FileStorage에만 적용됩니다.

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

-ResourceGroupName

리소스 그룹 이름.

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

-ResourceId

Storage 계정 리소스 ID 또는 파일 서비스 속성 리소스 ID를 입력합니다.

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

-ShareRetentionDays

Share DeleteRetentionPolicy의 보존 기간(일)을 설정합니다. 이 값은 공유 삭제 보존 정책을 사용하도록 설정할 때만 설정해야 합니다.

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

-SmbAuthenticationMethod

서버에서 지원하는 SMB 인증 방법을 가져오거나 설정합니다. 유효한 값은 NTLMv2, Kerberos입니다.

Type:String[]
Accepted values:Kerberos, NTLMv2
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SmbChannelEncryption

서버에서 지원하는 SMB 채널 암호화를 가져오거나 설정합니다. 유효한 값은 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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SmbKerberosTicketEncryption

서버에서 지원하는 kerberos 티켓 암호화를 가져오거나 설정합니다. 유효한 값은 RC4-HMAC, AES-256입니다.

Type:String[]
Accepted values:AES-256, RC4-HMAC
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SmbProtocolVersion

서버에서 지원하는 SMB 프로토콜 버전을 가져오거나 설정합니다. 유효한 값은 SMB2.1, SMB3.0, SMB3.1.1입니다.

Type:String[]
Accepted values:SMB2.1, SMB3.0, SMB3.1.1
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccount

Storage 계정 개체

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

-StorageAccountName

스토리지 계정 이름입니다.

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

-WhatIf

cmdlet이 실행될 경우 결과 동작을 표시합니다. cmdlet이 실행되지 않습니다.

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

입력

PSStorageAccount

String

출력

PSFileServiceProperties