标签:base als shel ESS proc last logo ring code
域控上创建对应OU$MailPasswd =ConvertTo-SecureString password -AsPlainText -Force
2.新建CSV文件NewMail.csv,格式如下
LastName,UserPrincipalName,Database,Alias,DisplayName,OrganizationalUnit,FirstName,Name,
LastName :姓
UserPrincipalName :邮箱地址
Database :指定数据库
Alias :别名
DisplayName :显示名称
OrganizationalUnit :指定一个OU
FirstName :名
Name :姓名
Import-Csv D:\test\NewMail.csv | ForEach-Object -Process {New-Mailbox -ResetPasswordOnNextLogon:$False -LastName $_.LastName -UserPrincipalName $_.UserPrincipalName -Database $_.Database -Alias $_.Alias -Password $MailPasswd -DisplayName $_.DisplayName -OrganizationalUnit $_.OrganizationalUnit -FirstName $_.FirstName -Name $_.Name}
标签:base als shel ESS proc last logo ring code
原文地址:https://blog.51cto.com/3032439/2472890