#1)通过CSV批量创建会议室邮箱

Add-PSSnapin *exchange*
$info=Import-Csv -Path D:\scripts\room.csv -Encoding Default
#$password=ConvertTo-SecureString -AsPlainText -String "xxxxxxx" -Force
foreach ($info1 in $info)

{
#创建会议室邮箱

New-Mailbox -Name $info1.alias -Database "BJDB01" -Room `
 -DisplayName $info1.displayname -Office $info1.ln -Alias $info1.alias `
 -PrimarySmtpAddress $info1.mailname -OrganizationalUnit "OU=会议室,OU=所有资源,DC=contoso,DC=local"
 }

 Start-Sleep -Seconds 180 -Verbose

 foreach ($info2 in $info)

 {

#打开默认的电子邮件地址策略

Get-Mailbox -Identity $info2.mailname | Set-Mailbox -EmailAddressPolicyEnabled:$true 

#设置会议最长保留期限(30天)

Get-Mailbox -Identity $info2.mailname | Set-CalendarProcessing `
-MaximumDurationInMinutes 1800 -BookingWindowInDays 180 -AutomateProcessing AutoAccept

}

#设置会议室权限审批人(某一个会议室)

Get-Mailbox -Identity "[email protected]" | Set-CalendarProcessing `
-AllBookInPolicy $false -AllRequestInPolicy $true -ResourceDelegates "[email protected]"

<#

更多内容可参考

创建和管理会议室邮箱: Exchange Online Help  
https://technet.microsoft.com/zh-cn/library/jj215781(v=exchg.150).aspx

#>

您也可以关注下方微信公众号获取更多资讯
PowerShell批量创建并设置会议室邮箱_第1张图片