external help file | applicable | schema |
---|---|---|
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online |
2.0.0 |
Set Auditing setting for a site
Set-PnPAuditing [-RetentionTime <Int>]
[-TrimAuditLog [<SwitchParameter>]]
[-EditItems [<SwitchParameter>]]
[-CheckOutCheckInItems [<SwitchParameter>]]
[-MoveCopyItems [<SwitchParameter>]]
[-DeleteRestoreItems [<SwitchParameter>]]
[-EditContentTypesColumns [<SwitchParameter>]]
[-SearchContent [<SwitchParameter>]]
[-EditUsersPermissions [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]
Set-PnPAuditing -EnableAll [<SwitchParameter>]
[-RetentionTime <Int>]
[-TrimAuditLog [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]
Set-PnPAuditing -DisableAll [<SwitchParameter>]
[-Connection <SPOnlineConnection>]
PS:> Set-PnPAuditing -EnableAll
Enables all auditing settings for the current site
PS:> Set-PnPAuditing -DisableAll
Disables all auditing settings for the current site
PS:> Set-PnPAuditing -RetentionTime 7
Sets the audit log trimming to 7 days, this also enables the automatic trimming of the audit log
PS:> Set-PnPAuditing -TrimAuditLog
Enables the automatic trimming of the audit log
PS:> Set-PnPAuditing -RetentionTime 7 -CheckOutCheckInItems -MoveCopyItems -SearchContent
Sets the audit log trimming to 7 days, this also enables the automatic trimming of the audit log.
Do auditing for:
- Checking out or checking in items
- Moving or copying items to another location in the site
- Searching site content
Audit checking out or checking in items
Type: SwitchParameter
Parameter Sets: Specific flags
Required: False
Position: Named
Accept pipeline input: False
Audit deleting or restoring items
Type: SwitchParameter
Parameter Sets: Specific flags
Required: False
Position: Named
Accept pipeline input: False
Disable all audit flags
Type: SwitchParameter
Parameter Sets: Disable All
Required: True
Position: Named
Accept pipeline input: False
Audit editing content types and columns
Type: SwitchParameter
Parameter Sets: Specific flags
Required: False
Position: Named
Accept pipeline input: False
Audit editing items
Type: SwitchParameter
Parameter Sets: Specific flags
Required: False
Position: Named
Accept pipeline input: False
Audit editing users and permissions
Type: SwitchParameter
Parameter Sets: Specific flags
Required: False
Position: Named
Accept pipeline input: False
Enable all audit flags
Type: SwitchParameter
Parameter Sets: Enable all
Required: True
Position: Named
Accept pipeline input: False
Audit moving or copying items to another location in the site.
Type: SwitchParameter
Parameter Sets: Specific flags
Required: False
Position: Named
Accept pipeline input: False
Set the retention time
Type: Int
Parameter Sets: Specific flags
Required: False
Position: Named
Accept pipeline input: False
Audit searching site content
Type: SwitchParameter
Parameter Sets: Specific flags
Required: False
Position: Named
Accept pipeline input: False
Trim the audit log
Type: SwitchParameter
Parameter Sets: Specific flags
Required: False
Position: Named
Accept pipeline input: False
Optional connection to be used by cmdlet. Retrieve the value for this parameter by eiter specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False