#129113 - 2004-11-08 05:04 PM
Re: How to find an OU?
|
redniels
Fresh Scripter
Registered: 2002-10-21
Posts: 19
Loc: Netherlands
|
fast....  DSquery.. thanks, found that already, but thatīs not what I need. lets give some more info.. why do I need it: Iīm trying to create a script which moves users form 1 part of our org to another. letīs say a user is in sales and gets a new job in another department, letīs say HR.
my script(s) (as far as the parts are ready) deletes the user from the sales groups, add him to the HR groups, moves the mailbox to the different Exchange 2003 store, moves his profile to the different profile share (letīs say server\HRprofiles) the same for his homedir. and the last thing I need to do is move this user from the sales OU to the HR OU. but since our organisation is quite large we have 60+ OUīs. I can create a "table" in my script, like
if "$newgroup"="HR" $newou="OU=xyz,OU=XYZ2,OU=HR,DC=company,DC=loc" endif (or case select, whatever)
but since this is high maintainance I donīt want it. I want to search in the AD with KIX for this new OU , and return the full ldap path ... which i can feed to the next command..
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1607 anonymous users online.
|
|
|