AD domain controller user replication with group membership

75 Views Asked by At

Trying to figure out why a PowerShell domain controller replication job for a user object does not sync groupmemberships (memberOf).

$users = 'wtst, tst'
$usersArray = $users.Split(',')

Invoke-Command -ScriptBlock {`
        $using:usersArray | ForEach-Object {`
        (Write-Output "Processing user $($_)..."), `
        ((Sync-ADObject -Object "CN=$_,OU=XXXX,DC=XXXX,DC=XXXX" -Source 'XXXX' -Destination 'XXXX'))
    }
} -ComputerName 'XXXX' -Credential $(Get-Credential)

Other profile properties sync just fine. What am I doing wrong?

0

There are 0 best solutions below