I use this script in a group policy for the computer (Computer configuration\windows settings\scripts\startup)
 
------------------------------------------------------------------------------------------------------------
'Add "YOUR DOMAIN GROUP" group to local admin group
on error resume Next
 
Dim DomainName
Dim UserAccount
Set net = WScript.CreateObject("WScript.Network")
 
local = net.ComputerName
'msgbox local
DomainName = "YOUR DOMAIN"
UserAccount = "YOUR DOMAIN GROUP"
 
'Adds "YOUR DOMAIN\YOUR DOMAIN GROUP" to local administrators group
set group = GetObject("WinNT://"& local &"/administrators")
group.Add "WinNT://"& DomainName &"/"& UserAccount &""
------------------------------------------------------------------------------------------------------------------

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Johnson
Sent: Tuesday, January 31, 2006 6:49 AM
To: [email protected]
Subject: [ActiveDir] Adding user's from Domain to local group VIA GPO

Hi all

 

 

Can anyone point me in the direction of a method to add a particular group from the domain to the local administrator’s group on all my workstations? I need to add my HelpDesk team as Local Administrators on all my workstations that are domain members.

 

 

Regards

Peter Johnson

Confidentiality Notice: The information contained in this message may be legally privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any release, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error please notify the author immediately by replying to this message and deleting the original message. Thank you.

Reply via email to