The Get-ADUser CMDLet has a Problem with Users that have a AccountExpirationDate ("accountExpires" Attribute in AD) greater as 01.01.10000 00:00:00.
The Error is "Invalid Win32-Filetime".
"user-A" has been set an Account Expiration Date in the GUI from ADUC to the max value of 31.12.9999. In the "accountExpires" Attribute in AD this makes a value of 01.01.10000 00:00:00 MEZ. (2650467708000000000)
Get-ADUser -Identity User-a -Properties AccountExpirationDate
runs without Problems and show the AccountExpirationDate 31.12.9999 23:59:59
Now "User-B" has been Set an Account Expiration Date with Script which directly writes the "accountExpires" Attribute with a value of 01.01.10000 01:00:00 MEZ (2650467744000000000)
Get-ADUser -Identity User-B -Properties AccountExpirationDate
brings the error "Invalid Win32-Filetime"
I think it is the same Problem because the CMDLet Search-ADAccount comes up with the "Invalid Win32-Filetime" error. (Connect Problem ID 774207)