Admin rights

Dear Experts,

Thanks for your support and co-operation.

I have one task now. There are nealy 100 machines (win7 os) are there and each machine is allocated to different users.I want to automate like to give admin access to each user on their allocated machines due to project requirement.

Kindly provide me a solution.

venkatspbSenior Software EngineerAsked:
Who is Participating?
nirbodConnect With a Mentor Commented:
You can try with launching a script  for each PC which will place specific domain user on theit PCs
Here is example:

1st you need command line with administrator privileges:
In run paste this

runas /user:%DOMAINNAME%\Administrator cmd

and then type your password (account can be any from the Administrators group):

then simply tipe

NET LOCALGROUP administrators %DOMAINNAME%\%user account% /ADD

if you want to remove them you can replace /add with /delete
replace %DOMAINNAME% with your domain name and %user account% with the username of the user which need to be local administrator.

hope that will help you to catch you goals

Assuming you have a domain - use a restricted group to give them local admin rights
Pramod UbheCommented:
You can do that in computer management by connecting it remotely to each computer.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Joseph OLoughlinIT Support SpecialistCommented:
Nirbod's solution is in my first-hand experience correct.
venkatspbSenior Software EngineerAuthor Commented:
Thanks nirbod for the solution.

Could you please provide the VB script o a batch file to provide admin access for a list of computers and respective users remotely.
Joseph OLoughlinConnect With a Mentor IT Support SpecialistCommented:
If you don't have your list of machines, to get a list of machines use either


or to get machines on now (only accurate to about 15 minutes)

obviously machines that are off don't run programs.
For another domain or workgroup use NET VIEW /domain:domainname
To keep the list do
NET VIEW >> Machines.txt

Use this as a source to create your batch files

Now using multiple batch files
create one LIST2INVOKE.CMD
:: Invoke authentication and group membership change on remote machine
FOR %F IN (Machine1 Machine2 ...) DO CHANGEGROUP.CMD
FOR %F IN (MachineN MachineM ...) DO CHANGEGROUP.CMD

your list of machines will need to be broken up into shorter lists to stay within the 255 character command line limit.

:: Create a scheduled task on remote machines to change group membership
NET USE \\%1\IPC$ /username:domain\admin password
AT \\%1 12:34 NET LOCALGROUP administrators %DOMAINNAME%\%user account% /ADD
venkatspbSenior Software EngineerAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.