#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
#>
您也可以關注下方微信公衆號獲取更多資訊