Doesn’t happen often that I need Windows tools, but this worked nicely, so I though I share it with the future me that will have forgotten about this method;


On the domain server open a “Windows Powershell”;

Import the module :

Import-Module ActiveDirectory

Then create the list of “enabled” users :

Get-ADComputer -Filter {enabled -eq $true} -properties *|select Name, OperatingSystem, LastLogonDate

This wil result in :

To export it in CSV :

Get-ADComputer -Filter {enabled -eq $true} -properties *|select Name, OperatingSystem, LastLogonDate | export-csv my_export.csv

Will create a file my_export.csv in csv format ! Enjoy.