Page 1 of 1 1
Topic Options
#74532 - 2003-04-14 11:16 PM Move a group to a specific OU
cmarti Offline
Hey THIS is FUN

Registered: 2001-02-26
Posts: 297
Loc: Little Rock, AR
I'm trying to move a group into a specific ou. I've looked at the microsoft code from:
Microsoft

I tried to put this into a kix script. According to the way it's coded in the Microsoft script the first line contains the path of the OU you want to put the group into. The second line tells where the group is currently, here's my script.
code:
 
$MoveTo = GetObject("LDAP://OU=Groups,OU=SomeOU,OU=US,DC=MyCompany,DC=MyCompany2,DC=MyCompany3")
? $MoveTo
$move= $MoveTo.MoveHere("LDAP://CN=lantest,CN=Users,DC=MyCompany,DC=MyCompany2,DC=MyCompany3")
? @serror

When I run it, this is what it gives me
code:
1460076
Invalid number of parameters.

I've also tried to take out the $move and it still doesn't like it...

What am I doing wrong? [Confused]

Thanks..

Top
#74533 - 2003-04-14 11:27 PM Re: Move a group to a specific OU
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
See this link.

http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=1;t=007033#000004

You need a second parameter to the movehere method.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#74534 - 2003-04-15 04:02 PM Re: Move a group to a specific OU
cmarti Offline
Hey THIS is FUN

Registered: 2001-02-26
Posts: 297
Loc: Little Rock, AR
Thanks for your reply..

Before posting I searched for movehere and found that link also. I've tried to alter the command to using that syntax, but it didn't work for me either..

Top
#74535 - 2003-04-15 05:54 PM Re: Move a group to a specific OU
cmarti Offline
Hey THIS is FUN

Registered: 2001-02-26
Posts: 297
Loc: Little Rock, AR
Finally,

Got it to work, I just had to look at that link a little more closely.

Thanks... [Big Grin]

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 931 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.054 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org