0

I need to acquire following information from the Windows 2008 Active Directory Domain Controller Server.

a) User name    
b) User ID  / O.U  
c) User Status (Disabled/Enabled)    
d) User Creation Date    
e) User Deletion Date    
f) User Last Login Date

I can get the user list by following command 

dsquery user -limit 0 | dsget user -dn -disabled -display -email -dept -title

How can I get other information as well in single window or text file?

1
  • Never mind, I got it using following command. – Syed Jahanzaib Feb 8 '17 at 6:11
0

I was able to acquire my customized result. I mostly use my Ubuntu box to manage my Active Directory. Following is full command from Linux terminal to acquire active directory user details for required query.

winexe -U DOMAIN/ADMIN%"PASSWORD" //10.0.0.0 'powershell.exe -command "import-module activedirectory; Get-ADUser -Filter * -Properties * | select Name,UserPrincipalName,Enabled,LockedOut,Created,LastLogonDate"' > /tmp/ad-users-details.txt

I used semicolon to execute two commands in single line, it was required to import AD modules first

I then tag it with webmin base modules, and all Ok now for support staff as well.

:)

Regard's

Jz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.