To add users to the booking policy for a conference room (resource mailbox) in Exchange Online or on-premises Exchange using PowerShell, you need to use the Set-CalendarProcessing cmdlet and the BookInPolicy parameter.
The BookInPolicy parameter specifies the users or groups who are allowed to submit in-policy meeting requests that are automatically approved [1, 2, 6][1][2].
Here's the process and the PowerShell commands:
1. Connect to Exchange Online PowerShell or open Exchange Management Shell:
For Exchange Online: You need to connect to Exchange Online PowerShell[2][3][4].
For On-Premises Exchange: You can use the Exchange Management Shell directly on an Exchange server or a workstation with the management tools installed.
2. Get the current list of users in the BookInPolicy (Optional but Recommended):
Before adding users, it's a good practice to see who is currently in the BookInPolicy. This helps you avoid overwriting the existing list.
Replace "YourConferenceRoomName" with the actual name, email address, or alias of your conference room mailbox.
3. Add the new users to the existing list:
The BookInPolicy parameter is a multi-valued property, meaning it can hold multiple values (users or groups)[1]. To add users without removing the existing ones, you need to retrieve the current list, add the new users to that list, and then update the BookInPolicy parameter with the modified list[5].
Here's how you can do it:
powershell
# Define the conference room identity
$RoomMailbox = "YourConferenceRoomName"
# Define the users you want to add (can be a single user or a comma-separated list)
$UsersToAdd = "[EMAIL_ADDRESS]", "[EMAIL_ADDRESS]" # Replace with the actual user identities
# Get the current BookInPolicy
$BookInPolicy = (Get-CalendarProcessing -Identity $RoomMailbox).BookInPolicy
# Create a new array with existing users and the new users
$NewBookInPolicy = @($BookInPolicy) + $UsersToAdd
# Update the BookInPolicy for the conference room
Set-CalendarProcessing -Identity $RoomMailbox -BookInPolicy $NewBookInPolicy
Explanation:
$RoomMailbox = "YourConferenceRoomName": This line sets a variable to hold the identity of your conference room mailbox.
$UsersToAdd = "[EMAIL_ADDRESS]", "[EMAIL_ADDRESS]": This line sets a variable to hold the identities of the users you want to add. You can list multiple users separated by commas. User identities can be their email addresses, aliases, or other unique identifiers [1].
$BookInPolicy = (Get-CalendarProcessing -Identity $RoomMailbox).BookInPolicy: This line retrieves the current value of the BookInPolicy parameter for the specified conference room and stores it in the $BookInPolicy variable.
$NewBookInPolicy = @($BookInPolicy) + $UsersToAdd: This line creates a new array ($NewBookInPolicy). It takes the existing users from $BookInPolicy and adds the new users from $UsersToAdd to it. Using @() ensures that $BookInPolicy is treated as an array, even if it's currently empty or contains only one value.
Set-CalendarProcessing -Identity $RoomMailbox -BookInPolicy $NewBookInPolicy: This line updates the BookInPolicy parameter of the conference room with the combined list of users stored in $NewBookInPolicy[2].
Important Considerations:
Permissions: You need appropriate permissions in Exchange to run these cmdlets. This usually requires roles like Organization Management or Recipient Management [8].
Identity: You can identify the conference room using its name, alias, email address, or distinguished name (DN) [1][2].
User Identities: Similarly, you can identify the users you want to add using their name, alias, email address, DN, or GUID [1, 6][2].
Overwriting vs. Adding: Be careful when using Set-CalendarProcessing with multi-valued parameters. If you simply run Set-CalendarProcessing -Identity "Room" -BookInPolicy "[EMAIL_ADDRESS]", you will replace the existing list with only the new user. The method above ensures you add to the existing list [5, 7][2].
AllBookInPolicy Parameter: The AllBookInPolicy parameter controls whether all users are automatically approved for in-policy requests[1][2]. If this is set to $true, the BookInPolicy list is ignored for automatic approval (though it might still be relevant for other settings) [1, 4]. If you want only specific users in the BookInPolicy list to have their requests automatically approved, ensure AllBookInPolicy is set to $false [3].
By following these steps and using the provided PowerShell script structure, you can effectively add users to the booking policy of your conference rooms while preserving the existing configurations.