• RSS
  • Twitter
  • FaceBook

Add Domain User To Local Administrators Group

  • Section(s): Administrator, Admin , Admin
  • Published on Dec 09, 2010.
  • Last Modified on Oct 31, 2009.
  • Last Modified by Nirmal Sharma.
  • Rated 5 out of 5 based on 3 votes.
This article explains how you can use Psexec.exe to add a domain user to local administrators Security group.

You have installed an application in your environment. This application needs to C$ of all the client computers to install it's Agent. To install the Agent, application requires admin access on all the client computers. Application is installed with a domain user (for example; AppAccount) which must be added to the Local Administrators Security Group on all the client computers.

To accomplish above, you can follow the steps outlined below:

Create a text file and name it CompList.TXT

Put all the client computer names in it.

Next, run the following command:

Psexec.exe -@CompList.TXT Net LocalGroup Administrators DomainName.COM/AppAccount /add

The above command runs against each computer mentioned in the CompList.TXT and adds the AppAccount to Local Administrators Security Group. 

You can download the Psexec.exe from here: http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

 

About Nirmal Sharma

Nirmal is a Microsoft MVP in Directory Services and working as a Technical Architect/Consultant. He has been involved in Microsoft Technologies since 1994 and followed the progression of Microsoft Operating Systems and software. He is specialized in Directory Services, Microsoft Clustering, SQL, MOM, Exchange and Citrix. In his spare time, he likes to help others and write "internal" technical articles, white papers and tips on various Microsoft technologies. You can contact him at nirmal_sharma@mvps.org.


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?