How to Convert pwdLastSet to a Date in PowerShell
To convert pwdLastSet to a date in PowerShell, pass the number to [datetime]::FromFileTimeUtc(). pwdLastSet is a Windows FILETIME, the count of 100-nanosecond ticks since January 1, 1601 in UTC: Below I convert it to Eastern time, handle the special 0 value, turn a date back into a FILETIME for LDAP filters and build a password … Read more