#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 "VIP-room-Meeting@contoso.local" | Set-CalendarProcessing ` -AllBookInPolicy $false -AllRequestInPolicy $true -ResourceDelegates "zengchuixin@contoso.local" <# 更多內容可參考 建立和管理會議室郵箱: Exchange Online Help https://technet.microsoft.com/zh-cn/library/jj215781(v=exchg.150).aspx #>
您也能夠關注下方微信公衆號獲取更多資訊api