none
Windows Server 2008 的Dc,如何在另一台装了win2003的机子上批量建账户 RRS feed

  • 问题

  • 域控是Windows Server 2008,如何在另一台装了win2003的机子上批量建账户到DC中?

     

    请各路专家相助。


    Franklin hong
    2011年4月3日 15:45

答案

全部回复

  • 你好,

    请参阅这篇文章,图文并茂,相信对你会有帮助的

    技巧:批量创建域用户帐号

    文章转载自网管之家:http://www.bitscn.com/os/windows/200812/155865.html


    TechNet Software Assurance Managed Newsgroup | MCTS: Windows Vista | Exchange Server 2007 MCITP: Enterprise Support Technician | Server & Enterprise Administrator | Microsoft Infrastructure Consultant | Solution Architect
    2011年4月4日 5:32
  •  

     

    谢谢您的指导,成功了。

     C:\>for /f "tokens=1,2,3,4,5 delims=," %a in (uses.csv) do dsadd user "cn=%c,ou=
            newusers,dc=contoso,dc=com" -samid %d -upn %d@contoso.com -fn
            %b -ln %a -pwd %e -disabled no

     

    但我不知delims=," %a是何意?且我做成add.cmd运行后总是不成功,我要先运行cmd.exe后再把add.cmd中的内容粘帖进去后回车才行。

    请指导下。

    Very thanks.


    Franklin hong
    2011年4月4日 10:09
  • 你好,

    add.cmd这个就是cmd.exe命令行模式下运行的命令啊,你把它改成add.bat进行批处理也可以的。

    很高兴对你有帮助。


    TechNet Software Assurance Managed Newsgroup | MCTS: Windows Vista | Exchange Server 2007 MCITP: Enterprise Support Technician | Server & Enterprise Administrator | Microsoft Infrastructure Consultant | Solution Architect
    2011年4月4日 12:10
  • Help!

    成功的是虚拟机环境,我在公司那台服务器上不能用啊。

    报错提示

    D:\>dsadd user "CN=Wang Yuqiang, OU=test, DC=AP1, DC=OFC.LOC"
    dsadd failed:CN=Wang Yuqiang,OU=test,DC=AP1,DC=OFC.LOC:A referral was returned f
    rom the server.
    type dsadd /? for help.

    还说

    D:\> -samid %b -UPN %b@AP1.OFC.LOC -fn %e -ln %d -pwd %c -disabled yes
    '-samid' is not recognized as an internal or external command,
    operable program or batch file.

    Why?

     


    Franklin hong
    2011年4月4日 13:17
  • 悲剧啊,无人应答
    Franklin hong
    2011年4月12日 6:01
  • Help!

    成功的是虚拟机环境,我在公司那台服务器上不能用啊。

    报错提示

    D:\>dsadd user "CN=Wang Yuqiang, OU=test, DC=AP1, DC=OFC.LOC"
    dsadd failed:CN=Wang Yuqiang,OU=test,DC=AP1,DC=OFC.LOC:A referral was returned f
    rom the server.
    type dsadd /? for help.

    还说

    D:\> -samid %b -UPN %b@AP1.OFC.LOC -fn %e -ln %d -pwd %c -disabled yes
    '-samid' is not recognized as an internal or external command,
    operable program or batch file.

    Why?

     


    Franklin hong

    please check your .bat file , the command in it was suspended by some reason
    面帶微笑,春暖花開
    2011年4月12日 7:03
    版主
  • delims 是代表分隔符的意思。 这里代表 分隔符是 , 号 也有的分隔符是 TAB

    为啥CMD 不行,因为 cmd 不支持命令之间有空格,如果存在空格则认为是命令结束,这就是你出错的原因

     


    ITPRO 的价值在于分享,程序开发人员的价值在于创造,架构师分析师的价值在于分析出客户潜在需求,项目经理的价值就是搞定客户!
    2011年4月12日 13:28
    版主
  • http://bbs.51cto.com/thread-798019-1.html
    2011年4月13日 19:00