Saturday, March 5, 2016

Create user in powershell

$strclass="User"
$strname="cn=user1"
$objadsi=[ADSI]"LDAP://ou=test,dc=tech-jockey,dc=com"
$objuser=$objadsi.create($strclass,$strname)
$objuser.Put("sAMAccountName","user1")
$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...