Local Admin Password Service report

I have deployed the Microsoft LAPS utility to automate the changing of local administrator passwords. The new password and expiration data are written back to AD. I’m attempting to write a powershell script that will show the date of expiration. The problem I’m having is in the conversion of date formats from the date in AD to a readable date. I’ve based my script on the last screen shot on this site what I have so far is

 get-adcomputer -filter {ms-Mcs-AdmPwdExpirationTime -like "*"} -Properties ms-Mcs-AdmPwdExpirationTime | Select Name, @{Name="Age";Expression={[datetime]::FromFileTime($_.ms-Mcs-AdmPwdExpirationTime)}} 

submitted by /u/erikcurtis
[link] [comments]

Leave a Reply