Saturday, March 5, 2016

Powershell Modify user properties

$objuser=[ADSI]"LDAP://cn=user1,ou=test,dc=tech-jockey,dc=com"
$objuser.Put("Samaccountname","user1")
$objuser.Put("givenname","myuser")
$objuser.Put("initials","raj")
$objuser.Put("sn","User")
$objuser.Put("displayname","new user")
$objuser.Put("description","user created by ldap")
$objuser.Put("telephoneNumber","8888888888")
$objuser.Put("mail","abcd@gmail.com")
$objuser.Put("wwwhomepage","http://www.google.com")
$objuser.setinfo()

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...