If you want to know the account usage in the AD, such as when to create, the last logon time is the time, the last password change, and other information, these can be achieved by using PowerShell.
In PowerShell, Get-AdUser can query a lot of information. For more information, see the following article:
Http://social.technet.microsoft.com/wiki/contents/articles/12037.active-directory-get-aduser-default-and-extended-properties.aspx
The following describes how to use PowerShell to query the creation time of all accounts in the specified OU \ SID \ last password change time \ last login time. The CMDlet is as follows:
Get-ADuser-searchbase'OU = User, OU = Compay1, DC = Domain, DC = COM'-Filter *-Properties * | Select-Object Name, SID, Created, PasswordLastSet, @ {n = "lastLogonDate"; e = {[datetime]: FromFileTime ($ _. lastLogonTimestamp) }}| Export-CSV Accountlist.csv-NoTypeInformation-Encoding UTF8
(Modify OU and domain information on your own)
Query the specified result to generate a. CSV file. Open it in Excel and perform necessary statistics and analysis. The results are as follows:
650) this. width = 650; "height =" 51 "title =" clip_image002 "style =" border: 0px currentcolor; display: inline; "alt =" clip_image002 "src =" http://www.bkjia.com/uploads/allimg/131227/1I9203M4-0.jpg "border =" 0 "/>
If you want to query all accounts in the entire AD, cancel-searchbase' in the middle'OU = User, OU = Compay1, DC = Domain, DC = COM.
This article is from the "big technology sharing" blog, please be sure to keep this source http://hubuxcg.blog.51cto.com/2559426/1247726