PowerShell batch open and configure Exchange2013 room mailbox

Source: Internet
Author: User

< #在微软的Exchange  2013 version, if you configure a room mailbox through a graphical interface, you'll find fewer options. And if it is batch open and do the corresponding configuration, with the graphical interface is more troublesome. and using PowerShell to open and configure is a good choice. Requirements are: 1) Create a room mailbox (the requester has provided a list of room mailboxes and location information) 2) set the name of the conference room, alias and turn on the default e-mail address policy 3) Booking period is 30 days 4) Individual meeting rooms require approval before meeting booking requests can be accepted #># for 1)-3) The requirement is implemented by saving the room information that needs to be created in a CSV file, including the following fields roomname,ln,mailname,alias,displaynamecmeeting,2f,[email  Protected],cmeeting, Wmeeting,2f,[email protected],wmeeting, Warcraft # Then we use two foreach loops, the first one to open the conference room, The second is to configure a room mailbox. $info = $null $info1= $null $info2= $nullAdd-pssnapin *exchange* $info =import-csv -path d:\scripts\ room.csv -encoding defaultforeach  ($info 1 in  $info) {#创建会议室邮箱New-mailbox -name   $info 1.alias -database  "DB01"  -Room   -DisplayName  $info 1.displayname  -Office  $info 1.ln -alias  $info 1.alias  '  -primarysmtpaddress $ info1.mailname -organizationalunit  "ou= meeting room, ou= all resources, ou=demo,dc=contoso,dc=com"  }   Start-sleep -seconds 180 -verbose  #这个地方加了一个休眠的时间 to leave a few minutes after the meeting room. Ad Sync time   #避免以为AD同步问题导致后面配置会议室邮箱不成功   foreach   ($info 2 in  $info)  {  #打开默认的电子邮件地址策略Get-mailbox -identity  $info 2.mailname  | set-mailbox -emailaddresspolicyenabled: $true   #设置会议最长保留期限 (30 days) get-mailbox -identity   $info 2.mailname | set-calendarprocessing  '-maximumdurationinminutes 1800 - Bookingwindowindays 180 -automateprocessing autoaccept} #如果想删除会议室邮箱, Use remove-mailbox -identity  "$info 1.roomname# in the above foreach if you want to add approval permission to an individual VIP room mailbox, use the command Get-mailbox  -Identity  "[email protected]"  | Set-CalendarProcessing  '-allbookinpolicy $ false -allrequestinpolicy  $true  -ResourceDelegates  "[email protected]"

This article from "Zeng Hung Xin Technical column" blog, declined to reprint!

PowerShell batch open and configure Exchange2013 room mailbox

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.