Commands › SharePoint Online
Stop-SPOAuditDataCollectionForActivityInsights
This cmdlet stops collecting audit data for reports on activities from the last 28 days, such as sharing link reports and content shared with everyone except external users, from the SharePoint admin center.
Quick start script
# Stop-SPOAuditDataCollectionForActivityInsights — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com
# 2. Run and inspect
Stop-SPOAuditDataCollectionForActivityInsights -ReportEntity <OptInReportEntityEnum> | Format-List
# 3. Export for evidence / drift tracking
Stop-SPOAuditDataCollectionForActivityInsights | Export-Clixml .\SPOAuditDataCollectionForActivityInsights-$(Get-Date -Format yyyyMMdd).xml
Syntax
Stop-SPOAuditDataCollectionForActivityInsights -ReportEntity <OptInReportEntityEnum> [<CommonParameters>]
Parameters (1)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.