PowerShell – create room resource as vacation calendar

There are numerous ways to announce your absence in a team using Outlook and Exchange, and they have all their weak and strong points.

One nifty solution though, is to create a room resource in Exchange / Office 365 and use its calendar as team vacations overview. Some of the advantages that this solution offers – it is flexible and it gets along with stubborn resistance. The idea behind is that everyone still enters his vacation in his own calendar and can still send invitations to whoever he finds appropriate. Additionally he sends it to the room resource that accepts is unconditionally. From the supervisor’s side you have also the same flexibility: some don’t want to know, so leave them alone, the information freaks can simply add this resource shared calendar to Outlook.

In this lightweight solution there are some deployment caveats though:

We firstly want to make the resource accept conflicting bookings; obviously there could be many team members away at the same time.

Secondly make the resource accept reoccurring events and also allow a larger time horizon: at least in Germany many people are booking their Christmas residences in January.

And thirdly give everyone (or a specified group) view permissions to the calendar, so that this can be opened in Outlook.

Unfortunately not everything can be configured from the web UI, hence the PowerShell script provided here. It is only three lines long and you can adjust it fast enough.

New-Mailbox -Name “Vacation Calendar” -DisplayName “Vacation Calendar” -PrimarySmtpAddress “vacation@contoso.com” -Room

 

Set-CalendarProcessing -Identity vacation@contoso.com -AutomateProcessing AutoAccept -AllowRecurringMeetings $true -AllowConflicts $true `

-ConflictPercentageAllowed 100 -MaximumConflictInstances 10 -BookingWindowInDays 365 -EnforceSchedulingHorizon $False `

-AddOrganizerToSubject $True -DeleteComments $False -DeleteSubject $False

 

Set-MailboxFolderPermission -Identity vacation@contoso.com:\calendar -User default -AccessRights reviewer

 

So that’s it.

Enjoy

Advertisements

2 thoughts on “PowerShell – create room resource as vacation calendar

  1. Hi I’m getting the following error for command 3:

    -ConflictPercentageAllowed : The term ‘-ConflictPercentageAllowed’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
    included, verify that the path is correct and try again.

  2. Hi Brian, -ConflictPercentageAllowed is parameter of the Set-CalendarProcessing command. Mind the accents at the end of both lines. Sometimes copy-paste from web browser to other application changes the special characters so the easiest way is to copy all three lines for this command to the ISE or other text editor and then make them one line, removing the accents. ISE should as well red-underline syntax errors.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s