Having recently migrated all of our department to Exchange 2007, we were excited to take advantage of the new conference room functionality! No more Outlook Resource configuration, no more faulty Auto-Accept script! Microsoft has FINALLY programmed in full-fledged resource mailbox functionality into Exchange.
Our dilemna. After migration from Exchange 2003, our resource mailboxes were showing up in the Exchange Management console as LinkedMailbox type.
get-mailbox "resource mailbox" | select RecipientTypeDetails
To convert them to UserMailbox type, Microsoft informed us that we'd need to disconnect the mailbox (from the AD account, then reconnect it. Afterwards, we can run the powershell cmdlet to assign the conference room calendar settings.
Sounds easy enough.
Disable-Mailbox -identity "Resource Mailbox"
Connect-Mailbox -identity "Resource Mailbox" -database (it's db) -user "domain\rsrmbxacct"
Right?? Nope.
- To connect a domain account to a mailbox, the account needs to be enabled. We've disabled all our resource accounts.
- When you enable an account, it needs to have a valid password based on your security standards.
- You have to wait for replication, which may not be immediately.
My following code, will read a straight list of mailbox names, and convert them from LinkedMailbox type mailboxes, to RoomMailbox type, then configure it as a conference room based on the following criteria.
- Auto-Accept Meeting requests (if meet policy) - isn't that the point of this excercise?
- Add Organizer name to subject - so when you use Plan a Meeting, you can see who has the time you want.
- Not allow conflicts - There is something to be said about allowing a certain amount of conflicts.
- Allow recurring meetings - booking individual meeting is just silly.
- Booking Window: 366 days - Furthest out you can book is until today's date, next year.
- Maximum Meeting Duration: 24hrs - should be booking as recurring. Too many times have I seen someone book a 2 hr, daily meeting that starts on Monday at 8AM, and ends Friday at 10AM. When they really wanted a 2hr meeting that Starting at 8am, on M,T,W,Th,F.
- Remove Attachments - Helps keep the conference room mailbox small. The conference room is NEVER going to read the agenda.
- Remove Private property - Private meetings don't appear on the Plan A Meeting view, if you don't have the specific permissions. So, don't let people book them.
- Delete Comments - Another trick to keep the conference room mailbox small.
- Delete Non Calendar Items - Yet another trick. People like to send 'message' based on the attendees of a specific meeting. Here come the meeting agendas!
- Disable Reminders - Nothing a delegate (or admin) hates more is having to wait to dismiss thousands of meeting reminders.
cls
#The following file contains list of mailbox display names, seperated by a carriage return.
$Rooms = Get-Content -path ".\AllConferenceRooms.txt"
#Set this variable to $true for normal conference rooms
#set this variable to $false for director conference rooms
#---------------------------
$NormalCRoom = $True
$Delegates = @("delegate1@example.com","delegate2@example.com")
#If this will be a 'director-type' conference room.
if ($NormalCRoom -eq $False){
$Delegates += "Delegate3@example.com"
}
foreach ($MyMailbox in $Rooms) {
$MyMailbox = $MyMailbox.Trim
()
if (($MyMailbox -ne $null) -and ($mymailbox -ne '')){
#Gathering some information
#---------------------------
$Mbx = get
-mailbox
$MyMailbox
$MyMailbox = $Mbx.DisplayName
"Working on '" + $MyMailbox + "'"
"-------------------------------------"
$mbxUPN = $mbx.UserPrincipalName
$DB = $Mbx | select database
| % {Get
-MailboxDatabase
-Identity
$_.database
}
if ($Mbx.RecipientTypeDetails
-eq "LinkedMailbox") {
"Linked mailbox - converting to UserMailbox"
Disable
-mailbox
$MyMailbox -erroraction stop
-outvariable Result
#Pausing script while waiting for the Disable-Mailbox command to process.
do {
$isDisabled = get
-user
-identity
$mbxUPN
} while ( $isDisabled.recipienttype
-eq "UserMailbox")
#Create a new password for the account based on the UPN field.
"Setting account password to :'"+$mbxUPN + "'"
$pwd = new-object Security.SecureString
$mbxUPN.ToCharArray
() | foreach { $pwd.AppendChar
($_)}
Set
-QADUser
-Identity
$mbxUPN -UserPassword
$pwd
"Reconnecting mailbox to domain account"
## found I needed to enble the AD account to get next step to work.
enable
-qaduser
-identity
$mbxUPN
Connect
-mailbox
-identity
$MyMailbox -database
$DB -user
$mbxUPN
disable
-qaduser
-identity
$mbxUPN
#Pausing script to wait for AD replication
do {
$isDisabled = get
-user
-identity
$mbxUPN
} while ( $isDisabled.recipienttype
-ne "UserMailbox")
$Mbx = get
-mailbox
$MyMailbox
}
#Convert standard mailbox to conference room resource
if ($Mbx.RecipientTypeDetails
-eq "UserMailbox") {
"Converting to Conference Room mailbox"
Set
-Mailbox
-identity
$MyMailbox -Type room
do {
$isDisabled = get
-user
-identity
$mbxUPN
} while ( $isDisabled.RecipientTypeDetails
-ne "RoomMailbox")
$Mbx = get
-mailbox
$MyMailbox
}
#configure conference room.
if ($Mbx.RecipientTypeDetails
-eq "RoomMailbox") {
if ($NormalCRoom -eq $true) {
"Configuring the conference room to auto accept meeting requests"
Set
-MailboxCalendarSettings
-Identity
$MyMailbox -AddOrganizerToSubject
$true -AllBookInPolicy
$true -AllowConflicts
$false -AllowRecurringMeetings
$true -AutomateProcessing AutoAccept
-BookingWindowInDays
366 -Confirm -DeleteAttachments
$true -DeleteComments
$true -DeleteNonCalendarItems
$true -DisableReminders
$true -EnableResponseDetails
$true -EnforceSchedulingHorizon
$true -MaximumDurationInMinutes
720 -AddAdditionalResponse
$false -OrganizerInfo
$true -RemoveForwardedMeetingNotifications
$true -RemoveOldMeetingMessages
$true -RemovePrivateProperty
$true
} else {
"Configuring the conference room to as a 'Director-type' mailbox"
Set
-MailboxCalendarSettings
-Identity
$MyMailbox -AddOrganizerToSubject
$true -AllBookInPolicy
$false -AllowConflicts
$false -AllowRecurringMeetings
$true -AutomateProcessing AutoAccept
-BookingWindowInDays
366 -Confirm -DeleteAttachments
$true -DeleteComments
$true -DeleteNonCalendarItems
$true -DisableReminders
$true -EnableResponseDetails
$true -EnforceSchedulingHorizon
$true -MaximumDurationInMinutes
720 -AddAdditionalResponse
$false -OrganizerInfo
$true -RemoveForwardedMeetingNotifications
$true -RemoveOldMeetingMessages
$true -RemovePrivateProperty
$true -AllRequestInPolicy
$true -ForwardRequestsToDelegates
$true
}
foreach ($Person in $Delegates) {
"Assigning "+$Person + " mailbox rights on this resource"
Add
-MailboxPermission
-AccessRights FullAccess
-Identity
$MyMailbox -User
$Person
}
"Assiging "+$delegates + " as Delegates to this resource."
Set
-MailboxCalendarSettings
-Identity
$MyMailbox -ResourceDelegates
$Delegates
}
"Completed."
" "
" "
}
}
Comments
Post new comment