Get-SPOTenantLogEntry
Retrieves SharePoint Online company logs. This cmdlet is reserved for internal Microsoft use.
Syntax
SiteSubscriptionId (Default)
Get-SPOTenantLogEntry
[[-StartTimeInUtc] <DateTime>]
[[-EndTimeInUtc] <DateTime>]
[[-MaxRows] <UInt32>]
[<CommonParameters>]
CorrelationId
Get-SPOTenantLogEntry
[[-StartTimeInUtc] <DateTime>]
[[-EndTimeInUtc] <DateTime>]
[[-MaxRows] <UInt32>]
-CorrelationId <Guid>
[<CommonParameters>]
Source
Get-SPOTenantLogEntry
[[-StartTimeInUtc] <DateTime>]
[[-EndTimeInUtc] <DateTime>]
[[-MaxRows] <UInt32>]
-Source <Int32>
[<CommonParameters>]
User
Get-SPOTenantLogEntry
[[-StartTimeInUtc] <DateTime>]
[[-EndTimeInUtc] <DateTime>]
[[-MaxRows] <UInt32>]
-User <String>
[<CommonParameters>]
Description
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).
Note
If you do not use any parameter, the first 1000 rows in descending time range are returned.
You must be at least a SharePoint Online administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at Intro to SharePoint Online Management Shell.
Examples
EXAMPLE 1
Get-SPOTenantLogEntry
This example retrieves all logs that are available.
EXAMPLE 2
Get-SPOTenantLogEntry -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".
Parameters
-CorrelationId
Applicable: SharePoint Online
Specifies the Correlation ID as a filter.
Parameter properties
Type: | System.Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
CorrelationId
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-EndTimeInUtc
Applicable: SharePoint Online
Specifies the end time in UTC to search for logs.
Parameter properties
Type: | System.DateTime |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-MaxRows
Applicable: SharePoint Online
Specifies the maximum number of rows in the descending order of timestamp. The value must be less than 5000. The default value is 1000.
Parameter properties
Type: | System.UInt32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 2 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Source
Applicable: SharePoint Online
Specifies the component that logs the errors.
Parameter properties
Type: | System.Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Source
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-StartTimeInUtc
Applicable: SharePoint Online
Specifies the start time in Coordinated Universal Time (UTC) to search for the logs (for example, 01032011:12:00).
Parameter properties
Type: | System.DateTime |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-User
Applicable: SharePoint Online
Specifies the log-on identity as a filter.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
User
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.