Hi all,
I am trying a simple LDAP Query to get "Last Password Change" from 2000 Active Directory and I am having a problem passing the CN since it is using the display name which contains a comma. Here is my code:
'strNamValue = "PLAINUSER"
strNamValue = "LastName, FirstName"
'NT AccountName = LastName_FirstName (doesn't work either)
Set objUser = GetObject ("LDAP://cn=" & strNamValue & ",ou=Users - ABC IBS,ou=Santa Ana,dc=corp,dc=RBB-inc,dc=com")
dtmValue = objUser.PasswordLastChanged
Wscript.echo "Password Last Changed: " & dtmvalue
This works for plainuser (which is also in the same location as all of the users I need to get to under the ABC IBS Group).
I am either getting "Invalid dn syntax" due to the comma, or I am getting "Object not on server" I don't know where to go with this.
Thanks in advance,
Armstrong
Greg Armstrong
A+ MCSE+I
I am trying a simple LDAP Query to get "Last Password Change" from 2000 Active Directory and I am having a problem passing the CN since it is using the display name which contains a comma. Here is my code:
'strNamValue = "PLAINUSER"
strNamValue = "LastName, FirstName"
'NT AccountName = LastName_FirstName (doesn't work either)
Set objUser = GetObject ("LDAP://cn=" & strNamValue & ",ou=Users - ABC IBS,ou=Santa Ana,dc=corp,dc=RBB-inc,dc=com")
dtmValue = objUser.PasswordLastChanged
Wscript.echo "Password Last Changed: " & dtmvalue
This works for plainuser (which is also in the same location as all of the users I need to get to under the ABC IBS Group).
I am either getting "Invalid dn syntax" due to the comma, or I am getting "Object not on server" I don't know where to go with this.
Thanks in advance,
Armstrong
Greg Armstrong
A+ MCSE+I