I'm trying to get a list of domain admin users from my Windows Server 2003 domain controller. I am unable to obtain it with powershell because the ActiveDirectory module is not installed.
I need to obtain it from CMD.
I have tried net group /domain "Domain Admins"
and while this returns all the Domain Admin users I need the following format which I don't know how to obtain. Any ideas?
The list should contain:
User name (Baker, John for example)
sAMAccountName (`I can obtain this with net /group`)
Account creation date
Last logon date
If the account is enabled or not
EDIT: I have tried dsquery group -name "Domain Admins" | dsget group -members -expand
but I don't get the expected output either.
Best Answer
Try this:
The created document now contains the DN of each member of the group. You can then use this to get more details for each user