Try to set the .Value property instead of adding another value to the
loSearchResult.GetDirectoryEntry().Properties("pwdLastSet").Value = 0;
What you're doing is adding another value to a potentially
multi-valued property - you'll have several values in that attribute
By setting it using .Value = 0, you're setting it to just one single
value of 0 (zero).
Marc Scheuner ** mscheuner -at- mvps.org ** http://www.yqcomputer.com/
Microsoft MVP for Directory Services Programming