Script to obtain last password change date

October 31st, 2008 - 04:53 pm ET by Bettie Claxton | Report spam
I am creating a script to get the date of the last password change for
each user in Users in abc.corp. I am trying to get the syntax right for the
Get Object for the user. It keeps failing on the Get Object command with the
error 80072030, There is no such object on the server. I copied the command
out of the script center and it is supposed to work against 2003 AD. The
line
is:
Set objUser = GetObject ("LDAP://CN=<userid>,OU=Users,DC=abc,DC=corp")

I used my id, so there should definitely be an object. Any ideas of why it
would fail?

Also, can someone suggest a good book to learn the basics of scipting?

Bettie
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 Richard Mueller [MVP]
October 31st, 2008 - 09:01 pm ET | Report spam
"Bettie Claxton" wrote in message
news:
I am creating a script to get the date of the last password change for
each user in Users in abc.corp. I am trying to get the syntax right for
the
Get Object for the user. It keeps failing on the Get Object command with
the
error 80072030, There is no such object on the server. I copied the
command
out of the script center and it is supposed to work against 2003 AD. The
line
is:
Set objUser = GetObject ("LDAP://CN=<userid>,OU=Users,DC=abc,DC=corp")

I used my id, so there should definitely be an object. Any ideas of why
it
would fail?

Also, can someone suggest a good book to learn the basics of scipting?

Bettie



See my reply in microsoft.public.windows.server.active_directory.

The best book I have seen on scripting, especially for admin tasks in AD, is
"Microsoft Windows 2000 Scripting Guide - Automating System Administration".
It covers VBScript, WSH, ADSI, ADO, and WMI. I like the hardcopy book, but
the text is available online at:

http://www.microsoft.com/resources/...rview.mspx

I discuss LDAP binding strings (which is what you are struggling with) in
this link:

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

Also, I dicuss the many "names" associated with user objects in this link:

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

Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net

Similar topics