unlock user script

  • Thread starter Thread starter Jason Higgins
  • Start date Start date
J

Jason Higgins

I am trying to write a script that will unlock a user
account using the lockoutTime property. I would like to
use the username in the LDAP path but it is not working.
I have to use the following.

Set oUser = GetObject("LDAP://CN=LastName\,
FirstName,CN=Users,DC=domain,DC=com")

When I replace "CN=LastName\, FirstName"
with "CN=UserName" I get an error that says the object
can't be found. Is it possible to use the UserName in
the LDAP path?
 
You can get the right dn of a user object, by opening ADSIEdit, locate user
and read distinguishname attribute.

--
Regards

Matjaz Ladava, MCSE (NT4 & 2000), Windows MVP
(e-mail address removed)
http://ladava.com
 
Back
Top