Configure

Disable SharePoint List Commenting at list level

This sample script shows how to disable commenting feature in SharePoint online lists at list level

Summary

This sample script shows how to disable commenting feature in SharePoint online lists at list level.

Scenario inspired from this blog post: Enable/Disable SharePoint Online List Comments using PnP PowerShell

If you want to enable/disable SharePoint list commenting at tenant level, check this PnP script sample: Disable SharePoint List Commenting at tenant level

Outupt Screenshot

powershell

# SharePoint online site URL
$siteUrl = "https://contoso.sharepoint.com/sites/SPConnect"

# Display name of SharePoint list
$listName = "Comments List"

# Connect to SharePoint online site
Connect-PnPOnline -Url $siteUrl -Interactive
 
# Disable SharePoint online list comments
Set-PnPList -Identity $listName -DisableCommenting $true

Contributors

Author(s)
Ganesh Sanap

Disclaimer

THESE SAMPLES ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

Tool documentation & references

Keep exploring