how to get user dispalyname, samaccount, last login date, and account status (Enable/Disable) for all user in domain with 2 DC
how to get user dispalyname, samaccount, last login date, and account status (Enable/Disable) for all user in domain with 2 DC
You can follow along here.
https://www.webservertalk.com/find-last-logon-users-or-computers
--please don't forget to upvote and Accept as answer if the reply is helpful--
Thank you for replying my question :)
the article is nice and very useful, I run the script and its collected user last login date but no information about the account status if it is disabled or enabled.
my target is to generate report that shows user display name, samaccount name, last login date and account status (both cases disabled or enabled)
These ones may also help.
https://social.technet.microsoft.com/Forums/ie/en-US/c96bbab7-fa79-41dc-9497-663c6d1b1781/getaduser-enabled-and-disabled-usersand-null-users?forum=winserverDS
https://social.technet.microsoft.com/Forums/ie/en-US/03a28ac4-0028-4195-9a01-2c442d61575a/using-getaduser-to-search-for-enabled-users-in-entire-domain-filter-?forum=winserverpowershell
--please don't forget to upvote and Accept as answer if the reply is helpful--
yes the first link help with the solution, I found what I'm looking for, thank you so much for answering :)
9 people are following this question.