Commit 488e667d authored by Jos Lieben's avatar Jos Lieben

fixed a bug in manager comparison

parent 981afdf0
......@@ -293,7 +293,7 @@ foreach($csvFile in $csvFiles){
Write-Error $_ -ErrorAction Continue
Continue
}
if($sourceAttributeValue -ne $adManager.distinguishedName){
if($adUser.manager -ne $adManager.distinguishedName){
try{
if(!$readOnly){
Set-ADObject -Identity $adUser.ObjectGUID -Replace @{$targetAttributeName=$adManager.distinguishedName} -Confirm:$False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment