Home All Groups Group Topic Archive Search About

list computers accounts that never have changed their password



Author
13 Nov 2007 8:11 PM
Gustavo
Hello, I need your help, I need to find a script, that list computers
accounts that never have changed their password, in an OU.

thanks

Author
13 Nov 2007 11:19 PM
Richard Mueller [MVP]
Gustavo wrote:

> Hello, I need your help, I need to find a script, that list computers
> accounts that never have changed their password, in an OU.

You can use ADO in a VBScript program for this. See this link:

http://www.rlmueller.net/ADOSearchTips.htm

In this case (using the variables in the above link):

strFilter = "(&(objectCategory=computer)(pwdLastSet=0))"
strAttributes = "sAMAccountName"
strBase = "<LDAP://ou=MyOU,dc=MyDomain,dc=com>"

You must specify the full Distinguished Name of the OU. sAMAccountName is
the NetBIOS name of the computer object with a trailing "$" appended to the
end. You can retrieve the value of distinguishedName instead. pwdLastSet is
an Integer8 (64-bit) attribute representing the date/time when the password
was last set. A value of 0 means never.

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--

AddThis Social Bookmark Button