Avatar of Matthieu Thomas
Matthieu Thomas

asked on 

Powershell Error with join-AzStorageAccountForAuth

Hello ,

I am tryning to Enable Active Directory authentication over SMB for Azure file shares and I am following the MS workflow Here

Unfortunately have a Powershell Error with  join-AzStorageAccountForAuth :

PS C:\windows\system32> Import-Module -name AzFilesHybrid

PS C:\windows\system32> Connect-AzAccount

OK


PS C:\windows\system32> join-AzStorageAccountForAuth -ResourceGroupName "xxx" -Name "xxx" -DomainAccountType "ComputerAccount" -OrganizationUnitName "xxx"
Get-AzStorageAccountADObject : AD object  is of unsupported object class msDFSR-ReplicationGroup msDFSR-ContentSet computer.
At C:\Users\XXX\Documents\WindowsPowerShell\Modules\AzFilesHybrid\0.1.1.0\AzFilesHybrid.psm1:2709 char:29
+     $azureStorageIdentity = Get-AzStorageAccountADObject `
+                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-AzStorageAccountADObject



PS C:\windows\system32> $storageaccount = Get-AzStorageAccount -ResourceGroupName "xxx" -Name "xxx"

PS C:\windows\system32> $storageAccount.AzureFilesIdentityBasedAuth.DirectoryServiceOptions

PS C:\windows\system32> $storageAccount.AzureFilesIdentityBasedAuth.ActiveDirectoryProperties


PS C:\windows\system32> 

Open in new window


Any thoughts ? Mat
Powershell* Distributed File System Replication (DFSR)Azure

Avatar of undefined
Last Comment
Matthieu Thomas

8/22/2022 - Mon