Posted 18 April, 2019
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.
If you enjoyed this article, please consider buying me a Dr Pepper.
Fuel the beast!
Buy me a Dr Pepper
were does the my_export.csv go?
in the current directory you where working in; you can check by using “dir” command