New Script – Add Users to Local Group on Remote Computer

Managing membership of local groups on servers and remote machines can become a nightmare if you don’t have a proper plan in place. In the near future I will write about restricting group membership via GPO. However, many older networks have yet to institute this type of organization, and have to rely on other methods for managing local group membership.

I’ve posted a new script that will add a user (or list of users) to a local group on a computer (or list of computers). I hope that you find this of some use, and I have added some small error detection and output formatting to make running against a large server list easier. I suggest redirecting the output to a .CSV file for easy management. You can add either a single user or a group of users. Make sure to specify your domain name in the strDomain variable.

You can find the script here and in our Scripting section. Follow the break for syntax.

Here is the syntax:

Single Computer:

cscript scriptName.vbs [computer] [group] [user_or_group]

Multiple Computers:

    For /f %i in (serverlist.txt) do cscript scriptName.vbs //NoLogo %i GroupName UserOrGroupName >> output.csv

As with any script ensure that you have properly tested it before using it in a production environment.

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress with [GimpStyle]
Entries and comments feeds.