Microsoft Exchange 2010 PowerShell Cookbook
上QQ阅读APP看书,第一时间看更新

Managing resource mailboxes

In addition to mailboxes, groups, and external contacts, recipients can also include specific rooms or pieces of equipment. Locations such as a conference room or a classroom can be given a mailbox so they can be reserved for meetings. Equipment mailboxes can be assigned to physical, non-location specific resources such as laptops or projectors and can then be checked out to individual users or groups by booking time with the mailbox. In this recipe, we'll take a look at how you can manage resource mailboxes using the Exchange Management Shell.

How to do it...

When creating a resource mailbox from within the shell, the syntax is similar to creating a mailbox for a regular user. For example, you still use the New-Mailbox cmdlet when creating a resource mailbox:

New-Mailbox -Name "CR32" -DisplayName "Conference Room 23" `
-UserPrincipalName CR23@contoso.com -Room

How it works...

There are two main differences when it comes to creating a resource mailbox as opposed to a standard user mailbox. First, you need to use either the -Room switch parameter or the -Equipment switch parameter to define the type of resource mailbox that will be created. Second, you do not need to provide a password value for the user account. When using either of these resource mailbox switch parameters to create a mailbox, the New-Mailbox cmdlet will create a disabled Active Directory user account that will be associated with the mailbox.

The entire concept of room and equipment mailboxes revolves around the calendars used by these resources. If you want to reserve a room or a piece of equipment, you book time through Outlook or OWA with these resources for the duration that you'll need them. The requests sent to these resources need to be accepted, either by a delegate or automatically using the Resource Booking Attendant.

To configure the room mailbox created in the previous example to automatically accept new meeting requests, we can use the Set-CalendarProcessing cmdlet to set the Resource Booking Attendant for that mailbox to AutoAccept:

Set-CalendarProcessing CR23 -AutomateProcessing AutoAccept

When the Resource Booking Attendant is set to AutoAccept, the request will be immediately accepted as long as there is not a conflict with another meeting. If there is a conflict, an e-mail message will be returned to the requestor explaining that the request was declined due to scheduling conflicts. You can allow conflicts by adding the –AllowConflicts switch parameter to the previous command.

When working with resource mailboxes with AutomateProcessing set to AutoAccept, you'll get an automated e-mail response from the resource after booking time. This e-mail message will explain whether the request was accepted or declined, depending on your settings. You can add additional text to the response message that the meeting organizer will receive using the following syntax:

Set-CalendarProcessing -Identity CR23 `
-AddAdditionalResponse $true `
-AdditionalResponse 'For Assistance Contact Support at Ext. #3376'

This example uses the Set-CalendarProcessing cmdlet to customize the response messages sent from the CR23 room mailbox. You can see here that we've added a message that tells the user the help desk number to call if assistance is required. Keep in mind that you can only add additional response text when the AutomateProcessing property is set to AutoAccept.

If you do not want to automate the calendar processing for a resource mailbox then you'll need to add delegates that can accept or deny meetings for that resource. Again, we can turn to the Set-CalendarProcessing cmdlet to accomplish this:

Set-CalendarProcessing -Identity CR23 `
-ResourceDelegates "joe@contoso.com","steve@contoso.com" `
-AutomateProcessing None

In this example, we've added two delegates to the resource mailbox and have turned off automated processing. When a request comes into the CR23 mailbox, both Steve and Joe will be notified and can accept or deny the request on behalf of the resource mailbox.

There's more...

When it comes to working with resource mailboxes, another useful feature is the ability to assign custom resource properties to rooms and equipment resources. For example, you may have a total of 5, 10, or 15 conference rooms, but maybe only four of those have whiteboards. It might be useful for your users to know this information when booking a resource for a meeting where they will be conducting a training session.

Using the shell, we can add custom resource properties to the Exchange organization by modifying the resource schema. Once these custom resource properties have been added, they can then be assigned to specific resource mailboxes.

You can use the following code to add a whiteboard resource property to the Exchange organizations resource schema:

Set-ResourceConfig -ResourcePropertySchema 'Room/Whiteboard'

Now that the whiteboard resource property is available within the Exchange organization, we can add this to our Conference Room 23 mailbox using the following command:

Set-Mailbox -Identity CR23 -ResourceCustom Whiteboard

When users access the Select Rooms dialog box in Outlook 2007 or 2010, they will see that Conference Room 23 has a whiteboard available.

Converting mailboxes

If you are moving to Exchange 2010 from 2003, you may have a number of mailboxes that were being used as resource mailboxes. Once these mailboxes have been moved over to 2010, they will be identified as Shared mailboxes. You can convert them using the Set-Mailbox cmdlet so that they'll have all of the properties of a resource mailbox:

Get-Mailbox conf* | Set-Mailbox -Type Room

You can run the Set-Mailbox cmdlet against each mailbox one at a time and convert them to Room mailboxes using the -Type parameter. Or, if you use a common naming convention, you may be able to do them in bulk by retrieving a list of mailboxes using a wildcard and piping them to Set-Mailbox, as shown previously.

See also

  • Adding, modifying, and removing mailboxes
  • Creating recipients in bulk using a CSV file