22 January 2017

Office 365 Published Calendar | Publish Date Range | Extend Past 6 Months

I recently had a client who uses an Office 365 calendar to show up on a website of theirs.  This was to make a certain calendar publicly available to everyone.  They realised that the calendar on their WordPress website was only showing six months ahead of time, and didn't show anything further than that.

This can be changed to a maximum of 12 months ahead of time for viewing calendar items, which I think is sufficient for a publicly available calendar (published calendar).  In order to find out the current setting, you will need to do this through PowerShell with the following command:

Get-MailboxCalendarFolder -Identity <EmailAddress>:\calendar

The field you're looking for is PublishDateRangeTo.  In the screenshot above, it shows the already changed field.  By default, this is set to SixMonths.

This explains why your published calendar suddenly goes blank after exactly six months.  In order to change this, you will need to use the following command:

Set-MailboxCalendarFolder -Identity <EmailAddress>:\calendar -PublishDateRangeTo OneYear

Once you have done this, use the following command to double-check and make sure it's showing the correct setting now.

Get-MailboxCalendarFolder -Identity <EmailAddress>:\calendar

If you check your published calendar, you will see that it now shows 12 months worth of events.