Microsoft Server
2003 server - Saturday, March 1, 2008 2:25 - 0 Comments
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
- Minimizing the performance hit from using ABE
- Custom Provider Creation in MOM
- Configure ABE from the command line
- Configure ABE on a clustered file server
- Enabling Remote Desktop Remotely
- Stop Errors and the System Log
- Troubleshooting Startup Problems
- Troubleshooting Startup Errors
- Process “Don’t Kill List”

