Active Directory 操作指南:用户与组管理
1. 批量导入用户到 Active Directory
在将多个用户导入到 Active Directory 时,手动操作或逐个编写脚本添加用户会变得非常繁琐。为了解决这个问题,可以将所有数据放入 CSV 文件中,然后从 CSV 文件中的信息进行批量导入。
以下是 Import-ADUser.ps1 脚本的示例:
##############################################################################
##
## Import-AdUser.ps1
##
## Create users in Active Directory from the content of a CSV.
##
## For example:
## $container = "LDAP://localhost:389/ou=West,ou=Sales,dc=Fabrikam,dc=COM"
## Import-ADUser.ps1 $container .\users.csv
##
## In the user CSV, One column must be named "CN" for the user name.
## All other columns represent properties in Active Directory for that user.
##
## For example:
## CN,userPrincipalName,displayName,mana
超级会员免费看
订阅专栏 解锁全文
905

被折叠的 条评论
为什么被折叠?



