自动化AD [英] Automating AD

查看:128
本文介绍了自动化AD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 


我是PowerShell的新手,我正在努力一个侧面项目,从我认为将采用XML格式的馈送文件自动化域上的帐户创建。有什么建议在处理这样的
任务时从哪里开始,或者它只是拼凑在那里的脚本?



非常感谢提前帮助。

解决方案

嗨Arbickerstaff,


我建议您自己动手,明确分离不同的组件(这样您可以排除一个方面的问题,而不会意外搞乱别人)。使用其他脚本可能会加快一些速度,但我建议考虑那些衡量最后
度假胜地,因为依靠复制和粘贴而不是创建(尤其是设计)它自己会抑制学习效果。


无论您使用XML还是Csv作为输入格式,PowerShell都可以同时处理:)


您需要机器上可用的PowerShell ActiveDirectory Cmdlet。因此,它们适用于任何具有AD的msc控制台的现代机器。这包括DC和Win 7客户端安装并激活远程服务器管理工​​具。


您可以在脚本的前面加载这行:

 Import-Module ActiveDirectory 

这将启用您需要的所有命令。


这些基础知识在设计过程中,将其拆分为单独的步骤,然后才开始编写脚本。


干杯和祝你好运,祝你好运b $ b Fred


Hi, 

I am new to powershell and I am working on a side project to automate account creations on the domain from a feeder file that i think will be in XML format. Any suggestions where to start when working on a task like this or is it just piecing together scripts already out there?

Many Thanks in advance for the help.

解决方案

Hi Arbickerstaff,

I recommend doing it yourself, clearly seperating the different components (that way you can troubleshoot one aspect without accidentally messing up others). Using other scripts may speed things up a bit, but I recommend considering those a measure of last resort, as relying on copy&paste instead of creating (and especially designing) it yourself inhibits the learning effect.

Whether you use XML or Csv as input format, PowerShell can handle both :)

You'll need the PowerShell ActiveDirectory Cmdlets available on the machine. They are thus on any modern machine that has the msc console for AD. That includes DCs and certainly Win 7 clients with the remote server administration tools installed and activated.

You can load them with this line at the head of the script:

Import-Module ActiveDirectory

This enables all the commands you'll need.

Those basics out of the way, design the process, split it into individual steps and only after that, start scripting.

Cheers and good luck,
Fred


这篇关于自动化AD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆