Using a Script to Add a Domain User to a Local Group
There are sometimes situations when you need to be able to script the process of adding a domain user to a local group on a machine. Here is a script that will do just that.
I ran into a scenario recently where I needed to add a domain group to the local administrators group of a large collection of workstations in my network. Rather than go around to all 500 of these machines individually I found a very useful little VBS script for getting this done.
option Explicit
Dim objGroup
Dim strComputer
On Error Resume Next
‘Variables you will want to change
strComputer = “.” ‘Computer is Local
‘Create Objects
Set objGroup = GetObject(”WinNT://” & strComputer & “/Administrators,group”)
‘Modify group memberships
objGroup.add(”WinNT://DOMAIN/GROUPNAME,group”)
Set objGroup = Nothing
Replace your variables, push this out via GPO, and voila! Enjoy!
Article written by MyComputerAid.com
2003 server - Sep 30, 2008 22:34 - 0 Comments
instant messaging srv records
More In Computers & PC
- Howto secure wordpress
- Simple wordpress upgrade from SSH howto
- permanently delete your facebook account
- Creating a Sound File
- Talking to the Mouse
Microsoft Outlook - Mar 22, 2009 11:22 - 0 Comments
Outlook: Duplicates in Mailbox
More In Computers & PC
- Howto secure wordpress
- Simple wordpress upgrade from SSH howto
- permanently delete your facebook account
- Creating a Sound File
- Talking to the Mouse
Microsoft Desktop, Web browsers and Internet, Windows 2000, Windows 7, Windows 98, Windows Firewall and networking, Windows Vista, Windows XP - Feb 8, 2010 18:09 - 0 Comments
Disable Proxy settings in IE
More In Computers & PC
- Howto secure wordpress
- Simple wordpress upgrade from SSH howto
- permanently delete your facebook account
- Creating a Sound File
- Talking to the Mouse
Leave a Reply
You must be logged in to post a comment.