Export (0) Print
Expand All

Get-SPOTenantLogEntry

 

Applies to: SharePoint Online, Office 365

Topic Last Modified: 2014-04-21

Retrieves SharePoint Online company logs.

Get-SPOTenantLogEntry [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>] [[-MaxRows] <UInt32>]
Get-SPOTenantLogEntry [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>] [[-MaxRows] <UInt32>] -CorrelationId <Guid>
Get-SPOTenantLogEntry [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>] [[-MaxRows] <UInt32>] -Source <Int32>
Get-SPOTenantLogEntry [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>] [[-MaxRows] <UInt32>] -User <String>

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.

The Get-SPOTenantLogEntry cmdlet cannot retrieve all SharePoint Online errors. This cmdlet retrieves a subset of errors that happen due to external systems.

For Beta 2, the only company logs available are for Business Connectivity Services (BCS).

NoteNote:
If you do not use any parameter, the first 1000 rows in descending time range are returned.

You must be a SharePoint Online global administrator to run the cmdlet.

 

Parameter Required Type Description

StartTimeInUtc

Optional

System.DateTime

Specifies the start time in Coordinated Universal Time (UTC) to search for the logs — for example, 01032011:12:00.

EndTimeInUtc

Optional

System.DateTime

Specifies the end time in UTC to search for logs.

MaxRows

Optional

System.UInt32

Specifies the maximum number of rows in the descending order of timestamp. The value must be less than 5000. The default value is 1000.

CorrelationId

Required

System.Guid

Specifies the Correlation ID as a filter.

Source

Required

System.Int32

Specifies the component that logs the errors.

User

Required

System.String

Specifies the log-on identity as a filter.

--------EXAMPLE 1--------

Get-SPOTenantLogLastAvailableTimeInUtc

This example retrieves all logs that are available.

--------EXAMPLE 2--------

Get-SPOTenantLogLastAvailableTimeInUtc -MaxRows 500

This example retrieves the first 500 log entries.

--------EXAMPLE 3--------

$endTimeinUTC = Get-SPOTenantLogLastAvailableTimeInUtc
$startTimeinUTC = $endTimeinUTC.AddDays (-14)
$tenantlogs = Get-SPOTenantLogEntry -StartTimeinUtc $startTimeinUTC -EndTimeinUTC $endTimeinUTC

This example retrieves log entries recorded over that previous 14 days.

--------EXAMPLE 4--------

$endTimeinUTC = Get-SPOTenantLogLastAvailableTimeInUtc
$startTimeinUTC = $endTimeinUTC.AddDays (-14)
$tenantlogs = Get-SPOTenantLogEntry -StartTimeinUtc $startTimeinUTC -EndTimeinUTC $endTimeinUTC -CorrelationId e2c2be70-6382-4ce7-8a44-ae7dadff5597

This example retrieves log entries recorded over that previous 14 days that have the CorrelationId of “e2c2be70-6382-4ce7-8a44-ae7dadff5597”.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft