RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
利用Powershell脚本和定时任务自动批量开邮箱
  1. 首先确保powershell 执行策略
PS C:\Users\administrator.51TALK> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
PS C:\Users\administrator.51TALK> Get-ExecutionPolicy
RemoteSigned
  1. 写PS脚本
    
    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)

当前标题:利用Powershell脚本和定时任务自动批量开邮箱
网页地址:http://scyingshan.cn/article/jodjeg.html