Wednesday, November 26, 2008

Determining When a Password was Last Set

Identifies the last time a user password was set.

Set objUser = GetObject _
    ("LDAP://CN=myerken,OU=management,DC=Fabrikam,DC=com")
dtmValue = objUser.PasswordLastChanged
WScript.echo "pwdLastSet is: " & dtmValue

This is a VB Script, this can be used by saving the file in .vbs file