As Roger mentioned, you don't need to run a process on the remote boxes. You
can remotely manipulate the membership. Just because the net command is
stupid doesn't mean the API won't do it. Look at lg on my web site. You wrap
that in a script you will find it will blow using psexec or rcmd out of the
water for speed of modifying a local group or a domain local group.
Basically it is net localgroup but allows you to specify the machine or
domain to work on.

http://www.joeware.net/win/free/tools/lg.htm


   joe

 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Rochford
Sent: Wednesday, April 06, 2005 4:21 AM
To: [email protected]
Subject: RE: [ActiveDir] Script to add a group to the local administrator's
group?

Don't need rcmd - use Sysinternals psexec
(http://www.sysinternals.com/ntw2k/freeware/psexec.shtml). In your command
you could just replace "rcmd" with "psexec" but it doesn't need anything on
the client (because it automagically installs itself on the
client)

You still might have to worry about machines not being switched on which is
why the machine startup script can be a better bet.

Steve 

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: 6 April 2005 03:12
> To: [email protected]
> Subject: RE: [ActiveDir] Script to add a group to the local 
> administrator's group?
> 
> Would be kinda handy if you have rcmd installed on all servers and put 
> them in the text list - without having to wait for startup scripts.
> 
> FOR /F "skip=1 usebackq delims==" %% IN (filename) DO rcmd
> \\%%1 "net localgroup administrators blabla /add"
> 
> Thank you and have a splendid day!
>  
> Kind Regards,
>  
> Freddy Hartono
> Windows Administrator (ADSM/NT Security) Spherion Technology Group, 
> Singapore For Agilent Technologies
> E-mail: [EMAIL PROTECTED]
List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to