Some Active Directory attributes return an 8 byte integer in the form of an IADsLargeInteger interface. An example is the pwdLastSet attribute from a user object.

Because the IADsLargeInteger object doesn’t provide type information PowerShell cannot read the HighPart and LowPart properties.

So I wrote the function below to get the Int64 value of an IADsLargeInteger:

Related posts:

  1. Reading accountExpires attribute from Active Directory (in Delphi)
  2. Recursive group Membership in Powershell
  3. Reading the otherWellKnownObjects attribute with PowerShell
  4. AD Internals: Display RID Allocation Pools
  5. Check if a useraccount exists with PowerShell