Get-CalendarDiagnosticLog

 

Applies to: Exchange Online, Exchange Server 2016

Topic Last Modified: 2017-12-19

This cmdlet is available in on-premises Exchange and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.

Use the Get-CalendarDiagnosticLog cmdlet to collect a range of calendar logs. The Calendar Diagnostic logs track all calendar items and meeting requests in mailboxes. You can use this information to troubleshoot calendar issues that occur in mailboxes.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Get-CalendarDiagnosticLog <COMMON PARAMETERS>

Get-CalendarDiagnosticLog -LogLocation <String> <COMMON PARAMETERS>

COMMON PARAMETERS: -Identity <UnifiedGroupOrUserMailboxIdParameter> [-Credential <PSCredential>] [-DomainController <Fqdn>] [-EndDate <ExDateTime>] [-EntryId <String>] [-ExactMatch <$true | $false>] [-ItemClass <String[]>] [-ItemIds <String[]>] [-Latest <SwitchParameter>] [-MeetingId <String>] [-ReadFromDomainController <SwitchParameter>] [-ResultSize <Unlimited>] [-StartDate <ExDateTime>] [-Subject <String>]

This example retrieves the Calendar Diagnostic log entries for Shannon Steele's mailbox by using the subject Weekly development meeting.

Get-CalendarDiagnosticLog -Identity "Shannon Steele" -Subject "Weekly development meeting" -ExactMatch $true

This example retrieves the Calendar Diagnostic log entries for Oscar Evans' mailbox from 6/1/2015 to 6/30/2015.

Get-CalendarDiagnosticLog -Identity oevans -StartDate "6/1/2015 6:00:00 AM" -EndDate "6/30/2015 5:00:00 PM"

This example retrieves the Calendar Diagnostic log data only for the most recent calendar item in Jasen Kozma's mailbox with a message subject of "Weekly development meeting".

Get-CalendarDiagnosticLog -Identity jkozma@contoso.com -Subject "Weekly development meeting" -Latest

This example exports all calendar items in the Calendar Diagnostic log for Jasen Kozma's mailbox that have "Budget Meeting" anywhere in the subject to the specified folder.

Get-CalendarDiagnosticLog -Identity "Jasen Kozma" -Subject "Budget Meeting" -ExactMatch $true -LogLocation "C:\My Documents\Calendar Diagnostic Export"

Notes:

  • In this example, the message files are written to C:\My Documents\Calendar Diagnostic Export\jkozma@contoso.com.

  • In on-premises Exchange organizations, you can use the Get-CalendarDiagnosticAnalysis cmdlet with the LogLocation parameter to analyze the exported .msg files.

The output of this cmdlet contains the following information:

  • IsFileLink   Indicates whether the calendar item has been exported to a .msg file by using the LogLocation parameter. Values are True or False.

  • Identity   Identifies the mailbox that holds the calendar item. An example value is: excallog://laura@contoso.com/?id=RgAAAACF/h/dHTTkQbdPrk7z+G4SBwCoatc7EmnEQq1iF35p17stAAAAAAFEAACoatc7EmnEQq1iF35p17stAAAAABEIAAAP.

  • LogDate   The date-time that the calendar item was logged.

  • NormalizedSubject   The Subject field of the calendar item.

  • CleanGlobalObjectId   The identifier that's constant throughout the lifetime of the calendar item. For example, 040000008200E00074C5B7101A82E00800000000B0225ABF0710C80100000000000000001000000005B27C05AA7C4646B0835D5EB4E41C55.

After you run the Get-CalendarDiagnosticLog cmdlet, you can analyze the calendar data using the Get-CalendarDiagnosticAnalysis cmdlet. For more information, see Get-CalendarDiagnosticAnalysis.

You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.

 

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.UnifiedGroupOrUserMailboxIdParameter

The Identity parameter specifies the mailbox that contains the calendar items. You can use any value that uniquely identifies the mailbox.

For example:

  • Name

  • Display name

  • Alias

  • Distinguished name (DN)

  • Canonical DN

  • <domain name>\<account name>

  • Email address

  • GUID

  • LegacyExchangeDN

  • SamAccountName

  • User ID or user principal name (UPN)

LogLocation

Required

System.String

The LogLocation parameter specifies the location to export the calendar items to .msg files. You can specify a local path, or a UNC path (\\<Server>\<Share>). If the value contains spaces, enclose the value in quotation marks (").

In the location you specify, a subfolder is automatically created for the specified mailbox that holds the exported calendar items. For example, if you specify the value "C:\My Documents\Calendar Export" to export calendar items from the mailbox of Shannon Steele, the .msg files are actually stored in C:\My Documents\Calendar Export\ssteele@contoso.com.

In on-premises Exchange organizations, you can use the Get-CalendarDiagnosticAnalysis cmdlet with the LogLocation parameter to analyze the exported .msg files.

Note: Commands that use this parameter might fail if the calendar item doesn't have a title. If you receive errors when you use this parameter, run the command again and replace this parameter with redirection to a file (> "C:\My Documents\Calendar Export") or substitute the output to a PowerShell variable.

Credential

Optional

System.Management.Automation.PSCredential

This parameter is available only in on-premises Exchange.

The Credential parameter specifies the user name and password that's used to run this command. Typically, you use this parameter in scripts or when you need to provide different credentials that have the required permissions.

This parameter requires the creation and passing of a credential object. This credential object is created by using the Get-Credential cmdlet. For more information, see Get-Credential.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

This parameter is available only in on-premises Exchange.

The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name (FQDN). For example, dc01.contoso.com.

EndDate

Optional

Microsoft.Exchange.ExchangeSystem.ExDateTime

The EndDate parameter specifies the end date of the date range.

Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format mm/dd/yyyy, enter 09/01/2015 to specify September 1, 2015. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2015 5:00 PM".

EntryId

Optional

System.String

The EntryId parameter filters the results by entry ID. You can specify multiple values separated by commas.

ExactMatch

Optional

System.Boolean

The ExactMatch parameter specifies whether to use an exact match or a partial match for text values that you specify for the Subject parameter. Valid values are:

  • $true   The subject search uses an exact match. For example, if you search for "budget", the command returns all calendar items that have "budget" anywhere in the subject, but not "budgeting".

  • $false   The subject search uses a partial match. For example, if you search for "budget", the command returns all calendar items that have "budget" and "budgeting" anywhere in the subject. This is the default value.

A partial subject match search may not return all of the relevant calendar items. Try using an exact subject match search for more accurate results.

ItemClass

Optional

System.String[]

The ItemClass parameter filters the results by item class . You can specify multiple values separated by commas..

You can only use this parameter with the MeetingID parameter.

ItemIds

Optional

System.String[]

The ItemIds parameter filters the results by item ID. You can specify multiple values separated by commas.

Latest

Optional

System.Management.Automation.SwitchParameter

The Latest switch specifies whether to return calendar log data for only the most recent calendar item. You don't need to specify a value with this switch.

MeetingId

Optional

System.String

The MeetingID parameter filters the results by the globally unique identifier of the calendar item. The value is the CleanGloablObjectId property of the calendar item that's available in the output of this cmdlet, or by using other MAPI examination tools. An example value is 040000008200E00074C5B7101A82E00800000000B0225ABF0710C80100000000000000001000000005B27C05AA7C4646B0835D5EB4E41C55. This value is constant throughout the lifetime of the calendar item.

To find this value, it's easiest to first search for the calendar item by using the Subject, StartDate, and EndDate parameters. After you find the calendar item that you want, you can use its CleanGloablObjectId value for the MeetingID parameter in future commands.

Don't use this parameter with the Subject parameter, because the value of the MeetingID parameter takes precedence.

ReadFromDomainController

Optional

System.Management.Automation.SwitchParameter

This parameter is available only in on-premises Exchange.

The ReadFromDomainController switch specifies that information should be read from a domain controller in the user's domain. If you run the command Set-AdServerSettings -ViewEntireForest $true to include all objects in the forest and you don't use the ReadFromDomainController switch, it's possible that information will be read from a global catalog that has outdated information. When you use the ReadFromDomainController switch, multiple reads might be necessary to get the information. You don't have to specify a value with this switch.

noteNote:
By default, the recipient scope is set to the domain that hosts your Exchange servers.

ResultSize

Optional

Microsoft.Exchange.Data.Unlimited

The ResultSize parameter specifies the maximum number of results to return. If you want to return all requests that match the query, use unlimited for the value of this parameter. The default value is 1000.

StartDate

Optional

Microsoft.Exchange.ExchangeSystem.ExDateTime

The StartDate parameter specifies the start date of the date range.

Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format mm/dd/yyyy, enter 09/01/2015 to specify September 1, 2015. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2015 5:00 PM".

Subject

Optional

System.String

The Subject parameter identifies the calendar items by the specified text in the Subject field. The text values that you specify aren't case sensitive. If the value contains spaces, enclose the value in quotation marks ("). You can control whether to use exact matching by using the ExactMatch parameter.

Don't use this parameter with the MeetingID parameter, because the value of the MeetingID parameter takes precedence.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

 
Show: