十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
PS C:\Users\administrator.51TALK> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
PS C:\Users\administrator.51TALK> Get-ExecutionPolicy
RemoteSigned
Add-PSSnapin microsoft.exchange*
Import-Module activedirectory
$dbs= @("bjstaff01","bjoffice","bjstaff02","bjstaff03")
$users= Get-User -OrganizationalUnit "北京" -RecipientTypeDetails user
foreach($i in $users){
$db= get-random -InputObject $dbs
Enable-Mailbox -Identity $i -Database $db
}
3. 创建任务计划
![](/upload/otherpic58/175091.jpg)