Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

ad users report

Is there anyway to get a report from Active Directory of all user accounts, listing the following fields

1.Account name
2.Last login date
3.Password expires (yes/no)
4.Password last set date
5.Account status (i.e. open, locked/expired, disabled)

Ideally written into a text file, or csv etc.
0
pma111
Asked:
pma111
  • 2
  • 2
  • 2
2 Solutions
 
ZenvenkyAssociate ArchitectCommented:
I think this can can accomplished by powershell. I found one powershell script in Technet which gives you last logon info about user.

http://gallery.technet.microsoft.com/scriptcenter/Get-Active-Directory-User-bbcdd771
0
 
Will SzymkowskiSenior Solution ArchitectCommented:
Use the following command below to accomplish this...

Export to CSV
Get-ADUser -Filter * -Properties * | Select sAMAccountName, LastLogonDate, PasswordExpired, PasswordLastSet, Enabled | Export-csv "c:\exportedusers.csv"

Export to txt
Get-ADUser -Filter * -Properties * | Select sAMAccountName, LastLogonDate, PasswordExpired, PasswordLastSet, Enabled | out-file "c:\exportedusers.txt"

Will.
0
 
pma111Author Commented:
Will - in what tool do you run that command?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Will SzymkowskiSenior Solution ArchitectCommented:
This is a Powershell Script. Also make sure that you run the below command before it will work...

Import-Module activedirectory

Then run the above commands.

Will.
0
 
pma111Author Commented:
do you have to run that on the domain controller? When you run

Import-Module activedirectory

Where are you importing it from? Do you need to install anything first?
0
 
ZenvenkyAssociate ArchitectCommented:
Yes, you need to install Powershell if you have Server 2003. If you have Server 2008 and above versions then by default Powershell installed. However you need to one more feature to install / import AD modules, check this links..

AD Modules
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now