Link to home
Start Free TrialLog in
Avatar of dominicb
dominicb

asked on

How to add a global group to a remote workstation?

I am local admin on all the workstations on my domain. The domain is a mix of NT4 and Windows 2000 without an Active Directory.

I need to add a global group into the local administrators group on some of the machines in my domain. I need to be able to do this remotely as the machines are spread throughout a huge building.

Any ideas how to do this?

Thanks
Avatar of AndresM
AndresM

you should use User Manager. Go to start/run, and type usrmgr.exe \\wks_name
Or if your wks is Windows 2000, right-click My Computer, select manage, right-click computer managment, and select connect to another computer.

BTW, if your wks is Windows NT Workstation, you should copy usrmgr.exe from a Windows NT Server, or execute it directly from the NT Server.
Avatar of dominicb

ASKER

Sorry I didn't quite phrase my question exactly right. I know how to operate user manager on NT4 and 2000.

What I want to do is add a global group into a local group on a large number of machines in the fastest way possible.

Ideally by running a script, not by using the gui.

I found cusrmgr.exe in the Windows 2000 resource kit which I used to update the local admin password on all these pc's but I can't find anything to add a global group to the local administrators group on the pc's.

Thanks
Dominic
Sorry I didn't quite phrase my question exactly right. I know how to operate user manager on NT4 and 2000.

What I want to do is add a global group into a local group on a large number of machines in the fastest way possible.

Ideally by running a script, not by using the gui.

I found cusrmgr.exe in the Windows 2000 resource kit which I used to update the local admin password on all these pc's but I can't find anything to add a global group to the local administrators group on the pc's.

Thanks
Dominic
Sorry I didn't quite phrase my question exactly right. I know how to operate user manager on NT4 and 2000.

What I want to do is add a global group into a local group on a large number of machines in the fastest way possible.

Ideally by running a script, not by using the gui.

I found cusrmgr.exe in the Windows 2000 resource kit which I used to update the local admin password on all these pc's but I can't find anything to add a global group to the local administrators group on the pc's.

Thanks
Dominic
Avatar of oBdA
Assuming that the time on your servers is not completely out of sync (in which case the command would be executed a day later), this should do the trick; since you mentioned the resource kit, you have "soon.exe".
This takes either a computer name as a single argument ("addlocal ServerName"), or you can use /L to give it a list with computer names to work it's way through ("addlocal /L Serverlist.txt"). In the list, you just specify one computername per line.

===addlocal.cmd======8<--------snip--------------------------
@echo off
setlocal
rem *** The local group you want to add your global group to:
set LGroup=YourLocalGroup
rem *** The global group that should be added to the local group above:
set GGroup=YourGlobalGroup
rem *** The delay in seconds before the job starts on the remote computer:
set Delay=300

if "%1"=="" goto leave
if /i not %1==/L goto process
for /f %%a in (%2) do call :process %%a
goto leave

:process
soon \\%1 %Delay% "net localgroup %LGroup% %GGroup% /add"

:leave
=========8<--------snip--------------------------

The usual disclaimer: Test it before you apply it in earnest.
Thankyou for your help. Sorry to take a while to reply again, been busy working on this!

I don't want to use the soon command because it relies on the clocks being correct on all the PC's and I have 6000 to do!

I have worked out a way to do this using a few tools from the resource kit. I am finishing off my VB app which will encompass all the commands. Once it's done I'll post it on my website and leave the link here.

Thanks
Dominic

dominicb:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
Oh dear, it's taken me ages to update this, apologies everyone!

Here's a link to the tool I wrote in VB to accomplish this task for me:

http://www.busfield.com/lcladmpwd.zip

It's very straightforward and easy to use, I put a little readme in there as well. Basically it reads the names of the PC's from a text file, attempts password change, if it fails it dumps the name into a failure text file.

It takes about 3 hours to change the password on 6000 PC's .

Hope this helps some people out.


Cheers
DominicB
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial