``` #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 #> ``` 您也可以关注下方微信公众号获取更多资讯 ![](https://s1.51cto.com/images/blog/201903/24/e8f04f3ad7c11c9b0a136b7aaf88c2e9.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)