Change Active Directory password with NetCmdlets

Here's how you can change your active directory (or other ldap server) password with the set-ldap cmdlet in /n software NetCmdlets. Also, recently I also showed how to this using the IP*Works! SSL LdapS dev component.

PS C:\> set-ldap -server myserver -binddn Domain\Administrator -password admin -dn "cn=BillyBob,ou=Employees,dc=DOMAIN" -newpassword mynewpassword -ssl implicit

Update: the -password parameter is now a secure string.  There is also a -credential parameter.  So the cmd to change the password is now either:

  1. PS C:\> set-ldap -server testboy -cred $mycred -dn "CN=Lance Robinson,CN=Users,DC=JUNGLE" -newpassword  lancer -ssl implicit

    or:
  2. PS C:\tools> set-ldap -server testboy -binddn JUNGLE\Administrator -password $password -dn "CN=Lance Robinson,CN=Users,DC=JUNGLE" -newpassword lancer -ssl implicit

    where $password is a secure-string, ie: $password = read-host -assecurestring

Technorati : , , , , , , ,

Print | posted on Wednesday, December 27, 2006 1:33 PM

Feedback

No comments posted yet.

Your comment:





 

Copyright © Lance Robinson

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski