Password age on user accounts on local computers

  • Thread starter Thread starter jacksneed2000
  • Start date Start date
J

jacksneed2000

Can anyone tell me how to enumerate the password age of user accounts
on local computers using vbscript or .net? I've found many examples
how to retrieve the password age of active directory user accounts, but
nothing on local computer user accounts. Also, please note I cannot use
3rd party applications or executebles in my work place (government
facility). Thanks!
 
You can't enumerate the age of local machine user accounts because the info
doesn't exist. There is no time stamp saying when they were created in the old
SAM format. This is why you don't see scripts or tools doing it.

joe
 
I am sorry, I misread the question. I thought you wanted, for some odd reason
only my inner mind knows, the time an account was created not the password age
even though everything you have here is about password age. Oy. I need to retire.

I actually have a tool that will dump this info for you in a csv format, look at
userdump on www.joeware.net

http://www.joeware.net/win/free/tools/userdump.htm

In vbscript you will need to use the iadsuser interface to gather the info,
there should be a method called something like passwordlastchanged which you
will need to convert to password age.
 
Very helpful! Thanks! But, I have found lastlogin enumerates fine,
but passwordlastchanged does not. Any idea why this might be?

Set usr = GetObject("WinNT://PCName/Administrator, user")
wscript.echo "Administrator last login: " & usr.LastLogin
wscript.echo "Administrator password age: " & usr.PasswordLastChanged
 
Back
Top