I am using the DirectoryServices namespace to iterate through users in an OU and displaying their AD properties in the Output window. One property I’m particularly interested is the pwdLastSet, which identifies the checkbox indicating that the user must change their password at next login. It returns System.__ComObject every time and I need it to return a Boolean to be of any use to me. Below is what I copied out of the cmd window. Is there a way to get a meaningful value out of this property?
>? User.Properties(“pwdLastSet”).Value
{System.__ComObject}
[System.__ComObject]: {System.__ComObject}