惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
博客园 - 司徒正美
C
Check Point Blog
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
IT之家
IT之家
B
Blog
博客园_首页
量子位
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
J
Java Code Geeks
H
Help Net Security
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
D
DataBreaches.Net
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News

博客园 - johnny tu

Moving............. Tech.ED North America 2008 Launch! (June 10-13,2008) 开启硬件辅助虚拟化——Intel虚拟化之旅 Exchange, I know something you don't know What is the Placeholder Domain Model? Office Communicator 2007 with Polycom Damn it! Microsoft Newsletters @ China. About the Statement Of Work(SOW) Microsoft Product Support's Reporting Tools Customizing the OC 2.0 Client /part 01 The ROUTE of OCS Edge Server got ERROR About Windows 2008 "Data Execution Prevention" - johnny tu exchange2007+outlook2007,无法使用外出助理 打开exchange2007管理控制台时,提示没有读取服务器安全描述符的权限 Exchange 2007 被攻击 exchange 2007 CCR 的...MSDTC 问题???? 在Exchange2007中,如何批量建立用户邮箱 Exchange 2007 AcitveDirectory架构 智能邮件筛选疑问
How To Create AD Users with PowerShell - johnny tu
johnny tu · 2008-05-21 · via 博客园 - johnny tu

SYNTAX:
CreateUser.Ps1 -name "CN=johnny" -ou "ou=TestOU" -dc "dc=ehloex,dc=lab"

   1: if($ou)
   2:  {  "Creating user $name in LDAP://$ou,$dc"  
   3:   $ADSI = [ADSI]"LDAP://$ou,$dc" 
   4:  }
   5: ELSE
   6:  { "Creating user $name in LDAP://cn=users,$dc" 
   7:   $ADSI = [ADSI]"LDAP://cn=users,$dc" 
   8:  } 
   9:  
  10: $CLass = "User"
  11: $User = $ADSI.create($CLass, $Name)
  12: $User.setInfo()

Enjoy it.

Johnny tu.