Hi All
I’m new to powershell so I’m finding my feet with it at the moment, I’m trying to capture when a users password expires amongst other things.
I have the following line of code however when returning “Passwordexpires” the time stamp is one hour behind, I have verified this by checking net user
[pre]Get-ADUser -Filter {Name -like $search} -Properties “Name”, “passwordlastset”, “Passwordneverexpires”, “passwordexpired”, “LockedOut”, “msDS-UserPasswordExpiryTimeComputed” | Sort-Object | Select Name, passwordlastset, @{Name=“Passwordexpires”;Expression={[datetime]::FromFileTime($_.“msDS-UserPasswordExpiryTimeComputed”)}}, Passwordneverexpires, passwordexpired, LockedOut[/pre]
I have also tried using FromFileTimeUtc as well but the result is still the same?
Thanks in advance
Brad