使用 CSV 作为输入清理 AD
我的人力资源部门为我提供了数千名用户的列表,其中包含更新的“公司”和“位置”字段。我想以此文件为基础清理AD。 我必须对名称进行某种“软匹配”,因为我不确定所有名称都 100% 匹配。 我该如何编写这样的脚本呢?
苏讷,挪威:)
My HR-department has provided me with a list of several thousand users with updated "company" and "location" fields. I would like to clean up AD with this file as basis.
I'll have to do some kind of "soft matching" on names because I'm not sure all names match 100%.
How would I go about scripting this so this?
Sune, Norway:)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您使用的是 Windows 2008 服务器,它包含用于 powershell 的本机 AD 管理模块。所以你不需要任务包。
这确实假设您希望将位置信息写入用户和计算机中的“办公室”字段。
ID 上的 * 应该进行软搜索。
If you are using a Windows 2008 server, it includes a native AD management module for powershell. So you don't need the Quest pack.
This does assume that you want the location information written to the "office" field in users and computers.
The * on the ID should do a soft search.
我会使用 Quest ActiveRoles Server PowerShell CmdLets。查看 Get-QADUser 示例。
I would use Quest ActiveRoles Server PowerShell CmdLets. Check out the Get-QADUser examples.
谢谢你们俩。
我这样做了,但最终得到了以下完整的脚本(希望这对其他人有用):
Thank you both.
I did, however end up with the following complete script (hope this can be of use to someone else):