Advanced troubleshooting calendar items

A while ago I wrote a post about Troubleshooting calendar items. Since then our capabilities improved as Microsoft added more functionality to Cmdlets and I enhanced also my own script (description can be found here).

The intention of this post is to give you a deep dive of advanced troubleshooting similar to my Get-ExchangeDiagnosticInfo post.

The content is as follows:

Get-CalendarItems

I improved the script by fixing bugs and added more functionality. This was based on feedback and the need in my daily work. You can download the script here:

https://gallery.technet.microsoft.com/scriptcenter/Get-CalendarItemsps1-330fb08c

Searching

The parameter EmailAddress is a System.Array and you can provide multiple email addresses comma separated to the script. With this you will get in one result all items across multiple mailboxes. This is very useful when it comes to manager/delegate scenario, which is sometimes very complex to analyze.

By Subject, CleanGlobalObjectID or GlobalObjectID

Most of the times people will give you the subject of a meeting, which causes issues.

Note: Keep in mind that the same subject doesn’t mean necessarily that this is the same meeting!

Here an example:

I’m searching for a give subject only in folders of type calendar


.\Get-CalendarItems.ps1 -EmailAddress user@yourdomain.com -Subject "Same subject not" -CalendarOnly

CalAdvanced_01

Even the items have the same subject the CleanGlobalObjectID is different.

As you can see these items don’t have any correlation besides the subject. Why is this so important?

I had many users, which complained about that meetings were not updated. The problem was that they had two or more items. One was a recurring meeting while the other one was a single instance, they updated the single instance and not the reccurring one. Or they had two recurring meetings with different attendees, which than caused confusion and of course user experience was very bad.

That’s something you really have to bear in mind. Once you narrowed an issue down to a specific item, you should use CleanGlobalObjectID to search across multiple mailboxes.

Note: Subject, CleanGlobalObjectID or GlobalObjectID cannot be combined!

By Dates

I had also cases where items got created or modified within a specific time range. When it comes to non calendar items I can encourage you read this post. But for calendar items the script can search by the following dates:

  • DateLastModified
  • DateTimeCreated
  • StartDate/EndDate

Note: These dates cannot be combined and StartDate/EndDate is only available for non-recurring meetings! All dates can be combined with Subject, CleanGlobalObjectID or GlobalObjectID!

One use case was a request from someone, who wanted to export all items for a specific time frame. All items where non-recurring meetings.

Here I’m searching for items, which have a StartDate and EndDate in the time range 3 month ago until today:


$Last3Month=.\Get-CalendarItems.ps1 -EmailAddress user@yourdomain.com -StartDate (Get-Date).AddMonths(-3) -EndDate (Get-Date) -CalendarOnly

If you’re looking for created or modified items, use the corresponding parameters.

I also had several cases where Outlook for Mac/Windows or Exchange ActiveSync devices created or modified multiple items. Searching by Dates might help you to reveal a malicious device.

AllItemProps vs. subset of properties

The script has a parameter AllItemProps, which makes a difference of what is pulled from the mailboxes. Without this parameter the script loads only IdOnly of the items, whereas with FirstClassProperties are loaded. A list of these can be found here.

In any case there are several other properties (including extended ones) loaded. The major difference is the following:

Taken the previous example with the same subject without AllItemProps


$Cal= .\Get-CalendarItems.ps1 -EmailAddress user@yourdomain.com -Subject "Same Subject not" -CalendarOnly

CalAdvanced_02

Now with AllItemProps


$CalAllItemProps= .\Get-CalendarItems.ps1 -EmailAddress user@yourdomain.com -Subject "Same Subject not" -CalendarOnly -AllItemProps

CalAdvanced_03

Why CleanGlobalObjectID and not GlobalObjectID?

Usually both properties have the same value, but when a recurring meeting has an exception (e.g.: one instance was modified) the value for CleanGlobalObjectID change as the fields for Year, Month and Day MUST be zero. This is described in the Office Dev Center here.

CleanGlobalObjectID is the unique identifier across multiple mailboxes for the same meeting and therefore the preferred property.

Export-MailboxDiagnosticLogs

I recently stumbled across this Cmdlet. To my shame I have to admit that I wasn’t aware of before.

This Cmdlet pulls diagnostics data from given mailbox for several components. Follow this link to get more info about the syntax.

Depending on the mailbox type you can export logs the following components

  • BirthdayAssistant
  • Calendar
  • CalendarPermissions
  • ClearCalendar
  • MeetingMessageProcessingAgent
  • MFN
  • MRM
  • OOF
  • OOFRules
  • RBA
  • RemindersAssistant
  • SharingSyncAssistant

Recently I had an issue with a meeting room, where a user had issue booking this room. The component RBA reflects the ResourceBookingAssistant and was very helpful. Also a history of CalendarPermissions is available, which really helps troubleshooting calendar issue. Think about changed permission for a delegate. Get-MailboxFolderPermission gives you only the current permission, but sometimes you need to know the permission at a certain point.

The components listed above were taken from an Exchange CU6 installation. Keep in mind that they can change with next CU and/or mailbox type. Of course Exchange Online has a lot more components in addition:

  • ActionProcessingAgent
  • AttendeeListReplicationAssistant
  • CalendarInterop
  • CalendarSharingLocalFolder
  • CalendarSharingMeetingMessageProcessingAgent
  • CalendarSharingPreAcceptCache
  • DefaultViewIndexer
  • DelegateRulesManagement
  • FreeBusyPublishingAssistantQuickLog
  • HoldTracking
  • InternetCalendar
  • InternalCalendarSharingMigration
  • Sharing
  • SharingMigrationAssistant
  • SweepRules

The same applies to the parameter -ExtendedProperties. This parameter cannot be combined and gives a detailed overview about a mailbox like DatabaseSchemaVersion, quotas, when assistants run and much more. To get a nice formated list of these data, run the following command:


([xml](Export-MailboxDiagnosticLogs -Identity user@yourdomain.com -ExtendedProperties).MailboxLog).Properties.MailboxTable.Property

CalAdvanced_04

Get-CalendarDiagnosticObjects

This Cmdlet is cloud-only and full details can be found here. In my previous post I mentioned the Cmdlets Get-CalendarDiagnosticLog and Get-CalendarDiagnosticAnalysis.

These are working great on-premises, but cannot be used for Exchange Online. At least not Get-CalendarDiagnosticAnalysis as it ends in a Watson dump or conversion error when you try to analyze logs.

Get-CalendarDiagnosticObjects is in my opinion the logical successor and the Cmdlet to use for Exchange Online mailboxes.

As you can see it gives you a lot of details:

CalAdvanced_05

Conclusion

I hope this post helps you troubleshooting any calendar issues. With the script and Export-MailboxDiagnosticLogs you have something for On-Premises and Exchange Online and for Exchange Online, with Get-CalendarDiagnosticObjects you are well equipped.

Any feedback is highly appreciated. Happy troubleshooting!

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s