MSExchangeGuru.com

Learn Exchange the Guru way !!!

 

Troubleshooting Calendar issues with Exchange server

Let’s troubleshoot Calendar issues with exchange using native tools and PowerShell.

There are various reasons like message formatting issues, message body truncation, etc. We see a lot of issues when we have more than delegates accessing calendar with multiple versions of client like Outlook 2013, 2010, Mac etc.

So while troubleshooting calendar items what are the attributes we need to look at?

=> PidTagLastModificationTime – The time when the last item was modified.

=> PidTagLastModifierName      – This attribute tells us who modified the item.

=> PidLidCleanGlobalObjectId   – This attribute is the most important one. It’s a unique identifier for recurrent appointments.

=> PidLidGlobalObjectId            – This is the Global Object Identity

=> 0x8059001E                    – This is one of the extended property. It records the client that modified the item.

=> 0x8054001E                   – Another extended property, which record the last action performed.

So to view the above mentioned properties we can use MFCMAPI tool. Download & run MFCMAPI on a client machine, launch & open the mailbox that is in concern. Below is a snapshot of MFCMAPI, to view properties of a user mailbox:


 

Let’s now see the various commands we can use to troubleshoot the calendar issue.

 

Apart from using the MFCMAPI tool, we have couple of commands we can run using the Exchange Management Shell to troubleshoot the issues. We will be using Get-CalendarDiagonisticLog & Get-CalendarDiagonisticAnalysis command.

Also make a note that the CmdLet Get-CalendarDiagnosticAnalysis is currently available only with Exchange 2013 on-prem. It’s not available in Exchange 2010 or in EXO.

We can use the below command to analyze an appointment with a specific subject name:

Get-CalendarDiagnosticLog -Identity User1 -Subject ‘test-meeting’ -LogLocation C:Temp

After running the command successfully, we can go check the temp folder for the logs.The next step is to analyze these logs. We can use the below command to analyze the logs:

Get-CalendarDiagnosticAnalysis -LogLocation ‘C:TempUser1’ -DetailLevel Advanced >C:TempReport.csv

This command is to open the CSV file in gridview:

Import-Csv C:TempReport.csv| Out-GridView

Here’s an example of analyzing an meeting scheduled by delegates:

When User2 is the delegate of User1 and sets up a meeting with his Manager Tom. Follow the list of steps below:

Step 1: Get all the Calendar items from all the mailboxes in this scenario:

  Get-CalendarDiagnosticLog -Identity User1 -Subject ‘Calendar test delegate’ -LogLocation C:Temp

  Get-CalendarDiagnosticLog -Identity User2 -Subject ‘Calendar test delegate’ -LogLocation C:Temp

  Get-CalendarDiagnosticLog -Identity Tom -Subject ‘Calendar test delegate’ -LogLocation C:Temp    

Step 2: Ok, now that we got the calendar items from all the mailboxes we have to analyze & create an HTML report:

  Get-CalendarDiagnosticAnalysis -LogLocation ‘C:TempUser1’ -DetailLevel Advanced -OutputAs HTML >C:TempUser1.html

  Get-CalendarDiagnosticAnalysis -LogLocation ‘C:TempUser2’ -DetailLevel Advanced -OutputAs HTML >C:TempUser2.html

  Get-CalendarDiagnosticAnalysis -LogLocation ‘C:TempTom’ -DetailLevel Advanced -OutputAs HTML >C:TempTom.

Step 3: We can create a CSV file for the above & open in Excel:

  Get-CalendarDiagnosticAnalysis -LogLocation ‘C:TempUser1’ -DetailLevel Advanced >C:TempUser1.csv

  Get-CalendarDiagnosticAnalysis -LogLocation ‘C:TempUser2’ -DetailLevel Advanced >C:TempUser2.csv

  Get-CalendarDiagnosticAnalysis -LogLocation ‘C:TempTom’ -DetailLevel Advanced >C:TempTom.csv

Additionally we can run the script for detailed report.

Script: Get-CalendarItems.ps1

Requirement to run the scripts:

=> We need to have Microsoft Exchange Web Services (EWS) installed.

=> We need to have the role Application Impersonation or you will need FullAccess on the mailboxes that we need to scan.

=> Download the scripts from this link: https://gallery.technet.microsoft.com/scriptcenter/Get-CalendarItemsps1-330fb08c

The script will be the following folders by default:

 folderclass :”IPF.Appointment”

 WellKnownFolder:Inbox,SentItems,RecoverableItemsRoot

 WellKnownFolder RecoverableItemsRoot except “Audits”

When we use the switch -CalendarOnly, it will only search for the folders with folderclass: “IPF.Appointment”. When using -AllFolders, it will search all the folders under the MsgFolderRoot.

Now let’s see few examples with the scenario: When User2 is the delegate of User1 and sets up a meeting with his Manager Tom.

Step 1: (arrange primary SMTP address)

[array]$mbs = “User1@msexchangeguru.com”,”User2@msexchangeguru.com”,”Tom@msexchangeguru.com”

Step 2: (is to search the mailboxes for items with ‘test-Meeting’ in the subject)

$basic=.Get-CalendarItems.ps1 -EmailAddress $mbs -Impersonate -Subject ‘test-meeting’

Then use $basic| Out-GridView (for looking at the output in a folder form)

You can now see the list of items with the specified subject open in a PS script.

What more? We can use -AllItemProps switch to search for the PidCleanGlobalObjectID . This script will get almost all items & use the output to troubleshoot.

$enhanced= .Get-CalendarItems.ps1 -EmailAddress $mbs -Impersonate -CleanGlobalObjectID 040000008200E00074C5B7101A82E00800000000F0838A8F1882D001000000000000000010000000099DC0EA675D1A4CA9BB87AF552001AB -AllItemProps

Below is the list of parameters accepted by the script

Below is the list of parameters accepted by the script

EmailAddress        –     The e-mail address of the mailbox which we need to check.

Credentials           –     Credentials we want to use.

Impersonate        –    Used when we want to impersonate.

Subject               –    Used to filter & search using the specified subject. Note that this cannot be used with CleanGlobalObjectID or GlobalObjectID.

StartDateLastModified    –    Used to filter items modified after this date. We can use this along with the parameter EndDateLastModified.

EndDateLastModified    –    Used to filter items modified before this date. We can use this along with the parameter StartDateLastModified.

CleanGlobalObjectID    –    This can be used when we know the ID using the MFCMAPI tool. Note that we cannot use this parameter with Subject or GlobalObjectID.

GlobalObjectID        –    This can be used when we know the ID using the MFCMAPI tool. Note that we cannot use this parameter with Subject or CleanGlobalObjectID.

CalendarOnly        –    Use this to limit the search to specific folder type like : “IPF.Appointment” By default the script will enumerate all folders

Server            –    This is used when you want to run the command against any other server. As its works via EWS, autodiscover we don’t have to mention the URL, just the server name will do.

AllFolders            –    Like we saw before, it searches all folders under MsgRootFolder.

AllItemProps        –    We can get all properties of an item using this parameter.

TrustAnySSL        –    This is used to try any SSL Certificate.

DateFormat            –    This is used to modify the format of the date being displayed. Use this to modify the date format being displayed according to your convenience.

Below is the output of parameters we will get:

 

LastModifiedTimeUTC    –    This displays the time when the item was last modified/ changed.

Mailbox    –    This parameter shows the mailbox where the item was found.

LastModifiedName    –    This displays the name of the user who modified the item.

Subject    –    This parameter displays the subject.

Client    –    This is used to check the Client that modified the item.

FolderPath    –    This is the path of folder where the item was found.

Action    –    This parameters is used for the action performed in the item.

Start    –    This parameter specifies the start date of the item.

End    –    This parameter specifies the end date of the item.

ItemClass    –    This parameter specifies ItemClass of the item.

CleanGlobalObjectID    –    This parameter specifies the CleanGlobalObjectID ID.

Organizer    –    This parameter is the organizer of the item.

RequiredAttendees    –    This parameter is the RequiredAttendees of the item.

OptionalAttendees    –    This parameter is the OptionalAttendees of the item.

IsRecurring    –    This parameter is the recurring.

DateTimeCreated       –    This parameter specifies when the item created.

DateTimeReceived    –    This parameter specifies when the item received.

DateTimeSent    –    This parameter specifies when the item was sent.

FolderID    –    This parameter specifies the EWS FolderID of the item.

GlobalObjectID       –    This parameter specifies the GlobalObjectID of the item.

 

When using the switch AlItemProps we will get the following output:

 

LastModifiedTimeUTC    –    This displays the time when the item was last modified/ changed.

Mailbox       –    This parameter shows the mailbox where the item was found.

Item    –    This parameter specifies the item itself as an object.

LastModifiedName    –    This displays the name of the user who modified the item.

Subject    –    This parameter displays the subject.

FolderPath    –    This is the path of folder where the item was found.    

Client    –    This is used to check the Client that modified the item    

Action    –    This parameters is used for the action performed in the item.

ItemClass    –    This parameter specifies ItemClass of the item.

Start    –    This parameter specifies the start date of the item.

End    –    This parameter specifies the end date of the item.

IsRecurring    –    This parameter is the recurring.

PidLidClientIntent    –    This parameter  indicates the action user has taken on a meeting object.

CleanGlobalObjectID    –    This parameter specifies the CleanGlobalObjectID ID.

GlobalObjectID        –    This parameter specifies the GlobalObjectID of the item.

HexItemEntryId    –         This parameter is the converted ItemEntryID.It can be used search history table.


Ratish Nair

Microsoft MVP | Exchange Server

Team @MSExchangeGuru

Keywords: Exchange server calendar issues, how to troubleshoot calendar issues with exchange, troubleshooting calendars with Exchange 2010 exchange 2013

Leave a Reply

Categories

Archives

MSExchangeGuru.com