in reply to Changing Organizational Unit in Active Directory
(where $ou is the destination OU and $logon is the user's logon name)my $oContainer = Win32::OLE->GetObject("LDAP://OU=$ou, DC=nmh, DC=n +mhschool, DC=ORG"); my $oUser = $oContainer->MoveHere("LDAP://CN=$logon, cn=Users, DC=n +mh, DC=nmhschool, DC=ORG","CN=$logon"); $oUser->SetInfo();
The point I have traditionally missed is that the default OU of 'Users' must be specified as 'CN=Users' not 'OU=Users'.
Others have asked for my examples and general account creation in AD, so I will post my entire script in the Code Catacombs.
Thanks again,
John
|
|---|