Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need Script to add local admin to global admin group On all computers at the same time

Posted on 2009-05-19
14
Medium Priority
?
471 Views
Last Modified: 2012-05-07
Need Script to add local admin to global admin group On all computers at the same time

Make sure i want to add it to all computers at same time... NOT one by one..

Thanks
Hardeep
0
Comment
Question by:Hardeep_Saluja
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
14 Comments
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24420181

How many computers? Using Group Policy would probably be a better option. It wouldn't be all at once, but not much will.

For VbScript, to do it all at once you'd have to run as many VbScripts as you have computers. Why does it have to be all at once and not sequential?

Chris
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 1000 total points
ID: 24420270
It could be run on all machines that are on using a VB Script or similar looping through machines.  I would do it using Group Policy personally if your OU structure is planned with computers, servers etc. in different containers?

Or you could create a startup script to make the change as people boot their computers up - assuming here that users do not have admin rights so they won't be able to do it from a login script.

Steve
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 24420277
Sorry for duplication, hadn't refreshed there from opening before...

Steve
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 71

Expert Comment

by:Chris Dent
ID: 24420303

No worries, happens to everyone :)

Chris
0
 
LVL 6

Author Comment

by:Hardeep_Saluja
ID: 24421502
Hi i have the script for one machine at a time...
Also, using group polciy would not be recommended as it would replace existing groups for a local administrator account

Any script which can add global admin for a domain like <domain>\global admin to a local administrator account for aparticular set of machines at the same time..?

Thanks
Hardeep
0
 
LVL 71

Assisted Solution

by:Chris Dent
Chris Dent earned 1000 total points
ID: 24421574

> Also, using group polciy would not be recommended as it would replace existing
> groups for a local administrator account

It doesn't have to, it depends entirely on how you do it. Granted the regular approach does just as you describe and is a pain. But it isn't the only way.

The alternative is to create a new restricted group, use  the name of the domain group "global admin", then select the MemberOf option and add "Administrators". It'll find the Domain local group at that point but it doesn't matter, it will work. Just make sure the policy only applies to workstations.

I use the method Steve suggested personally, a little computer startup script that runs:

net localgroup Administrators /add "domain\global admin"

It's really lovely and simple.

Chris
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 24421812
Me again... yes that is what I did for one client that didn't want Group policy fiddled with.

The group policy options both work nicely depending upon what you want to do -- again in one case it was wanted to specifically replace the administrators group contents, i.e. clear out any unauthorised local admins.  The other option Chris has suggested will neatly sort out adding a new entry too.

Always easier when planned into the AD from the start which I have had the pleasure of designing a few from scratch but always do-able to retro-fit too.

Steve
0
 
LVL 6

Author Comment

by:Hardeep_Saluja
ID: 24590198
Sorry none solution accepted as i have 4000+ users and i cannot apply GP to all
I wanted a script .. Thanks
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24590334

Hey,

What's wrong with the logon script approach?

Chris
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24590470

I'll happily help you here if you can define the terms you want the script to run under and why the login script method is no help.

Chris
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24636460

I recommend:

Split: dragon-it (http:#24420270), and Chris-Dent (http:#24421574)

I had contemplated suggesting reducing the points available for this question because of the duplication. It seems wrong to delete when the solutions offered here are exactly equivalent to the VbScript offerings in the newer thread.

Chris
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question