our PC's have all a local administrators group which contains different
specified users (depending on the users who will use the PC).
Now we want to add one global group to the local administrators group
through a group policy *without* overwriting the current content of the
local administrators group (just add the group to the existing content). I
don't succeed in it, so could someone help me out?
TIA,
Xavier
Dim net, DomainString, UserString, UserObj
set net = Wscript.CreateObject("Wscript.Network")
strComputer = "."
DomainString = net.UserDomain
UserString = net.UserName
Set objDomainUser = GetObject("WinNT://" & DomainString & "/" & UserString)
For Each ObjGroup In UserObj.Groups
Select Case GroupObj.Name
Case "Your Global Group"
Set objLocalGroup = GetObject("WinNT://" & strComputer &
"/Administrators,group")
objGroup.Add(objDomainUser.ADsPath)
End Select
Next
--
Regards,
Christoffer Andersson
No email replies please - reply in the newsgroup
If the information was help full, you can let me know at:
http://www.itsystem.se/employers.asp?ID=1
"Xavier" <xdepoorter...@hotmail.com> skrev i meddelandet
news:%23MaAGGj...@TK2MSFTNGP11.phx.gbl...
Create a batch file which you inlcude in a startup script
of the machine part of your policy.
The batch file should include the following command:
net localgroup "Administrators" "x\y" /add
where x is the Pre-W2K Domain Name of your domain and "y"
is the global group name.
>.
>