Hi Eugene,
I'd like to say this is working, but it is still placing new users into "MyCompany.org/Users". I copied the IT DN and placed it in the code per your suggestion (the IT OU is the only one so far for test purposes).
Here's the modified script:
Import-Module Adaxes
$department = "%department%"
$departmentMap = # TODO: modify me
@{
"IT"="OU=IT,OU=Office Staff,OU=MyCity,OU=MyBusinessUnit,DC=MyCompany,DC=org";
}
$targetOU = $departmentMap[$department]
if ($targetOU -eq $NULL)
{
$Context.LogMessage("No target OU specified for department '$department'", "Warning")
return
}
Move-AdmObject "%distinguishedName%" $targetOU
It is set to run "If the opeation succeeded then *Run PowerShell script 'Bind user to an OU' for the User"
I also ran this at the server to remove possible network issues.
Any help would be greatly appreciated . . .