Egil Hansen
2005-02-23 21:50:40 UTC
Hi
I need to remove a computer object from a group so it is not a member
anymore, but I need to do it via a batch script. I found a article on
TechNet that talked about using cusrmgr.exe (server 2000 reskit util)
but couldn't get it to work. I also played around with dsmod, but
since the computers all are in different OU I couldn't figure out how
to do that either. Can anybody help me out?
Say for instant, I have to computer objects, both member of the group
called "TestGroup". I want to remove them, when I run a script on each
of the computers (e.g. the computer I run the script on gets removed).
E.g.:
My domain is: microsoft.com
My groups name is: TestGroup, and is located at: microsoft.com\Users\
My first computer name is: PC001, and is located at
microsoft.com\Computers\
My second computer name is: PC002, and is located at
microsoft.com\Helpdesk\Computers\
How do I make a script that will detect what the computer name is and
where it is located in the domain, and then cancel its membership of a
specific group?
Long post, hope it makes a little sense.
Best regards, Egil Hansen.
I need to remove a computer object from a group so it is not a member
anymore, but I need to do it via a batch script. I found a article on
TechNet that talked about using cusrmgr.exe (server 2000 reskit util)
but couldn't get it to work. I also played around with dsmod, but
since the computers all are in different OU I couldn't figure out how
to do that either. Can anybody help me out?
Say for instant, I have to computer objects, both member of the group
called "TestGroup". I want to remove them, when I run a script on each
of the computers (e.g. the computer I run the script on gets removed).
E.g.:
My domain is: microsoft.com
My groups name is: TestGroup, and is located at: microsoft.com\Users\
My first computer name is: PC001, and is located at
microsoft.com\Computers\
My second computer name is: PC002, and is located at
microsoft.com\Helpdesk\Computers\
How do I make a script that will detect what the computer name is and
where it is located in the domain, and then cancel its membership of a
specific group?
Long post, hope it makes a little sense.
Best regards, Egil Hansen.