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
Solved

list all admin account

Posted on 2012-04-02
7
335 Views
Last Modified: 2012-04-19
I am new to scripting. I want a script to list all admin account in the entire domain. I can use Active role console or can run  from server. Could you please help. Thanks
0
Comment
Question by:cyrilma
7 Comments
 
LVL 57

Expert Comment

by:Mike Kline
ID: 37796752
Are you looking for members of "domain admins"   I wrote a blog that will give them to you

http://adisfun.blogspot.com/2012/03/lastlogontimestamp-for-group-members.html

That will also give you the last time they logged in, lots of ways as you can see in the blog

Thanks

Mike
0
 

Author Comment

by:cyrilma
ID: 37796857
Thanks, Mike for the quick response. I need the list of all users belongs to Admin account, enterprise admin, schema admin in the entire forest for an auditing purpose.
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 37796861
just use the example from the blog; you can do it for each group.

Thanks

Mike
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 35

Expert Comment

by:Joseph Daly
ID: 37796926
I like the DS series of tools for this sort of stuff. The following command will get you what you are looking for.


dsquery group -name "domain admins" | dsget group -members -expand | dsget user -ln -fn -samid
0
 
LVL 21

Expert Comment

by:motnahp00
ID: 37797037
Try this:

net group "Domain Admins"
0
 

Author Comment

by:cyrilma
ID: 37797204
Thanks a lot for all your suggestions and help.

Admin accounts are spreade across different domains. We are trying to create a script which can fetch info of all admin accounts in root domain and in other sub domains. Anyone who has any kind of administrative rights we need details which need to send it to audit team on monthly basis.

I found a good VB script I want to share with you all..

http://halfloaded.com/blog/vbscript-list-all-members-of-sensitive-groups-schema-enterprise-and-domain-admins/
0
 
LVL 15

Accepted Solution

by:
Russell_Venable earned 500 total points
ID: 37803886
I have a script already made for this. You might want to check it out here. If you need tweaking of course it can be done. This script reads a list of machines and reports the results in separate files including the ones that do not work.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

840 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