list all admin account

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
cyrilmaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike KlineCommented:
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
cyrilmaAuthor Commented:
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
Mike KlineCommented:
just use the example from the blog; you can do it for each group.

Thanks

Mike
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Joseph DalyCommented:
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
motnahp00Commented:
Try this:

net group "Domain Admins"
0
cyrilmaAuthor Commented:
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
Russell_VenableCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.