I can run this in Powershell no issues, would appropriate any help. I am writing how many days left until an account expires to a VA.
THE CAUSE
$Expiration = (([datetime]::FromFileTime((Get-ADUser –Identity $user -Properties "msDS-UserPasswordExpiryTimeComputed")."msDS-UserPasswordExpiryTimeComputed"))-(Get-Date)).Days
THE ERROR
At line: 18 char:9. Exception calling "FromFileTime" with "1" argument(s): "Not a valid Win32 FileTime. Parameter name: fileTime"