Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if user has local admin rights

Status
Not open for further replies.

biglebowski

Technical User
Jan 29, 2004
3,117
0
36
GB
We have been given an account to support a customer but we need to check that it has local admin rights on all the servers. Is there a quick way of doing this, it is a domain account but we don't have any access to the DC's so the test will have to be done on the server itself. I've tried creating a local user but this will take someone a long time to check on 50+ servers.

I assume that checking on one server should suffice as it is a domain account??

Biglebowskis Razor - with all things being equal if you still can't find the answer have a shave and go down the pub.
 
I'm curious, why would you need local rights unless these 50 pc's are not all part of the same domain? What would you be doing locally that a domain admin couldn't do?
 
because we don't have or can't have domain admin rights. The application tools require local admin rights.

Biglebowskis Razor - with all things being equal if you still can't find the answer have a shave and go down the pub.
 
Use these commands:
net user /?
net localgroup /?

Find the syntax you need, make a list of the computernames and batch it.
 
I had a similar situation where I needed to give a set of users local admin rights to servers but not to the whole domain. I created a group in AD and then wrote a script to add that user account to the local admin group and pushed it out as a startup script with a GPO. I can provide code if needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top