Page 1 of 1 1
Topic Options
#21299 - 2002-05-07 08:42 PM Add domain group to local Admin group
Anonymous
Unregistered


Does anyone know how I can add a domain group to the local system (User Manager) administrator group on a NT system? I would like to be able to control it from a login script. any thoughts?
thanks,
william

Top
#21300 - 2002-05-07 10:19 PM Re: Add domain group to local Admin group
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You can do this several ways. The first two methods require that your user have Admin permissions on the computer already. The third requires that you install and use SU.exe. The last method would be for you as Admin to execute a script that makes the change to a remote computer via the network.

1. Net localgroup administrators Domain\Account /add

2. Script with COM. This also requires ADSI on the client.
code:
$grp = GetObject("WinNT://@wksta/administrators")
$grp.add("WinNT://@Ldomain/group1")

3. Use SU.exe to give the script the required permissions then use #1 or #2. Never used it, but you can find many threads on its use.

4. You can modify the script in #2 and run from your computer and target other computers. Or you can use a third party tool like AddToAdmin.exe

This thread contains many good ADSI code snippets: Add to Your ADSI Code Library

[ 07 May 2002, 22:40: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
Page 1 of 1 1


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

Who's Online
0 registered and 611 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.049 seconds in which 0.023 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