Forum Discussion
Admin_Tommy_Gustafsson
Dec 12, 2022Copper Contributor
Comments on Modern SharePoint sites
hi
we have disabled comments for SharePoint sites in Admin Center
is there a way to enable it only on a few sites without enable it for all sites ?
Admin_Tommy_Gustafsson Are you asking about site page comments or SharePoint list/library comments?
You can enable/disable list comments at tenant level or list level, check:
- How to Enable/Disable the commenting in SharePoint Online/Microsoft Lists - tenant level
- Enable/Disable the comments for a SharePoint Online/Microsoft List - list level
Related read: SharePoint Online: All you need to know about Commenting in Lists
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- Admin_Tommy_GustafssonCopper Contributor
ganeshsanap I am talking about for example the comments on the bottom of a news page
we have disable comments on tenant level.
I hope that i could enable it only on a few news sites instead of enable it for the hole Tenant and then disable it site by site
- That's only possible via PowerShell, check my script above. It should disable it for all sites that you've got already. 🙂
- Hi Tommy!
Yes you can do from the library settings 🙂- Not sure if he means about comments on modern pages
Yeah Juan you're probably right!
If it's site pages, then he needs to enable it in Admin center as if it's disabled in admin-center then changing the properties in SharePoint using Powershell won't work:
After changing the setting in the admin-center he can run this
:
Connect-PnPOnline -url "" -Interactive #Get all site collections $allSites = Get-PnPTenantSite Foreach($site in $AllSites) { //this will disable for all sites Set-PnPSite -Identity $site -CommentsOnSitePagesDisabled $True } //this will enable comments for all specific sites: Set-PnPSite -Identity $site -CommentsOnSitePagesDisabled $False //for a specific page Set-PnPClientSidePage -Identity “Home Page” -CommentsEnabled:$false