| external help file | Microsoft.Online.SharePoint.PowerShell.dll-Help.xml |
|---|---|
| Module Name | Microsoft.Online.SharePoint.PowerShell |
| online version | https://learn.microsoft.com/powershell/module/microsoft.online.sharepoint.powershell/get-spotenantlogentry |
| applicable | SharePoint Online |
| title | Get-SPOTenantLogEntry |
| schema | 2.0.0 |
| author | samkabue |
| ms.author | speedta |
| ms.reviewer |
Retrieves SharePoint Online company logs. This cmdlet is reserved for internal Microsoft use.
Get-SPOTenantLogEntry [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>] [[-MaxRows] <UInt32>]
[<CommonParameters>]
Get-SPOTenantLogEntry -CorrelationId <Guid> [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>]
[[-MaxRows] <UInt32>] [<CommonParameters>]
Get-SPOTenantLogEntry -Source <Int32> [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>]
[[-MaxRows] <UInt32>] [<CommonParameters>]
Get-SPOTenantLogEntry -User <String> [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>]
[[-MaxRows] <UInt32>] [<CommonParameters>]
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.
Get-SPOTenantLogEntryThis example retrieves all logs that are available.
Get-SPOTenantLogEntry -MaxRows 500This example retrieves the first 500 log entries.
$endTimeinUTC = Get-SPOTenantLogLastAvailableTimeInUtc
$startTimeinUTC = $endTimeinUTC.AddDays(-14)
$tenantlogs = Get-SPOTenantLogEntry -StartTimeinUtc $startTimeinUTC -EndTimeinUTC $endTimeinUTCThis example retrieves log entries recorded over that previous 14 days.
$endTimeinUTC = Get-SPOTenantLogLastAvailableTimeInUtc
$startTimeinUTC = $endTimeinUTC.AddDays(-14)
$tenantlogs = Get-SPOTenantLogEntry -StartTimeinUtc $startTimeinUTC -EndTimeinUTC $endTimeinUTC -CorrelationId e2c2be70-6382-4ce7-8a44-ae7dadff5597This example retrieves log entries recorded over that previous 14 days that have the CorrelationId of "e2c2be70-6382-4ce7-8a44-ae7dadff5597".
Applicable: SharePoint Online
Specifies the Correlation ID as a filter.
Type: System.Guid
Parameter Sets: CorrelationId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseApplicable: SharePoint Online
Specifies the end time in UTC to search for logs.
Type: System.DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseApplicable: 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.
Type: System.UInt32
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseApplicable: SharePoint Online
Specifies the component that logs the errors.
Type: System.Int32
Parameter Sets: Source
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseApplicable: SharePoint Online
Specifies the start time in Coordinated Universal Time (UTC) to search for the logs (for example, 01032011:12:00).
Type: System.DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseApplicable: SharePoint Online
Specifies the log-on identity as a filter.
Type: System.String
Parameter Sets: User
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.