@@ -253,75 +253,4 @@ function Test-ShareSoftDelete
253
253
}
254
254
}
255
255
256
- <#
257
- . SYNOPSIS
258
- Test Storage File Service Properties
259
- . DESCRIPTION
260
- SmokeTest
261
- #>
262
- function Test-FileServiceProperties
263
- {
264
- # Setup
265
- $rgname = Get-StorageManagementTestResourceName ;
266
-
267
- try
268
- {
269
- # Test
270
- $stoname = ' sto' + $rgname ;
271
- $stotype = ' Premium_LRS' ;
272
- $loc = Get-ProviderLocation_Canary2 ResourceManagement;
273
- $kind = ' FileStorage'
274
-
275
- Write-Verbose " RGName: $rgname | Loc: $loc "
276
- New-AzResourceGroup - Name $rgname - Location $loc ;
277
-
278
- # $loc = Get-ProviderLocation_Canary ResourceManagement;
279
- New-AzStorageAccount - ResourceGroupName $rgname - Name $stoname - Location $loc - Type $stotype - Kind $kind
280
- $stos = Get-AzStorageAccount - ResourceGroupName $rgname ;
281
-
282
- # Enable MC, and set smb setting
283
- Update-AzStorageFileServiceProperty - ResourceGroupName $rgname - StorageAccountName $stoname `
284
- - SMBProtocolVersion SMB2.1 , SMB3.0 , SMB3.1.1 `
285
- - SMBAuthenticationMethod Kerberos, NTLMv2 `
286
- - SMBKerberosTicketEncryption RC4- HMAC, AES- 256 `
287
- - SMBChannelEncryption AES- 128 - CCM, AES- 128 - GCM, AES- 256 - GCM
288
- $servicePropertie = Get-AzStorageFileServiceProperty - ResourceGroupName $rgname - StorageAccountName $stoname
289
- Assert-AreEqual 3 $servicePropertie.ProtocolSettings.Smb.Versions.Count
290
- Assert-AreEqual 2 $servicePropertie.ProtocolSettings.Smb.AuthenticationMethods.Count
291
- Assert-AreEqual 2 $servicePropertie.ProtocolSettings.Smb.KerberosTicketEncryption.Count
292
- Assert-AreEqual 3 $servicePropertie.ProtocolSettings.Smb.ChannelEncryption.Count
293
-
294
- # Disable MC, update smb setting
295
- Update-AzStorageFileServiceProperty - ResourceGroupName $rgname - StorageAccountName $stoname `
296
- - SMBProtocolVersion SMB3.1.1 `
297
- - SMBAuthenticationMethod Kerberos `
298
- - SMBKerberosTicketEncryption AES- 256 `
299
- - SMBChannelEncryption AES- 128 - CCM
300
- $servicePropertie = Get-AzStorageFileServiceProperty - ResourceGroupName $rgname - StorageAccountName $stoname
301
- Assert-AreEqual " SMB3.1.1" $servicePropertie.ProtocolSettings.Smb.Versions [0 ]
302
- Assert-AreEqual " Kerberos" $servicePropertie.ProtocolSettings.Smb.AuthenticationMethods [0 ]
303
- Assert-AreEqual " AES-256" $servicePropertie.ProtocolSettings.Smb.KerberosTicketEncryption [0 ]
304
- Assert-AreEqual " AES-128-CCM" $servicePropertie.ProtocolSettings.Smb.ChannelEncryption [0 ]
305
-
306
- # remove smb setting
307
- Update-AzStorageFileServiceProperty - ResourceGroupName $rgname - StorageAccountName $stoname `
308
- - SMBProtocolVersion @ () `
309
- - SMBAuthenticationMethod @ ()`
310
- - SMBKerberosTicketEncryption @ () `
311
- - SMBChannelEncryption @ ()
312
- $servicePropertie = Get-AzStorageFileServiceProperty - ResourceGroupName $rgname - StorageAccountName $stoname
313
- Assert-AreEqual $null $servicePropertie.ProtocolSettings.Smb.Versions
314
- Assert-AreEqual $null $servicePropertie.ProtocolSettings.Smb.AuthenticationMethods
315
- Assert-AreEqual $null $servicePropertie.ProtocolSettings.Smb.KerberosTicketEncryption
316
- Assert-AreEqual $null $servicePropertie.ProtocolSettings.Smb.ChannelEncryption
317
-
318
- Remove-AzStorageAccount - Force - ResourceGroupName $rgname - Name $stoname ;
319
- }
320
- finally
321
- {
322
- # Cleanup
323
- Clean - ResourceGroup $rgname
324
- }
325
- }
326
-
327
256
0 commit comments