Forum Discussion

Admin_Tommy_Gustafsson's avatar
Admin_Tommy_Gustafsson
Copper Contributor
Dec 12, 2022

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 ?

6 Replies

  • 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:

    1. How to Enable/Disable the commenting in SharePoint Online/Microsoft Lists - tenant level
    2. 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_Gustafsson's avatar
      Admin_Tommy_Gustafsson
      Copper 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 

      • NicolasKheirallah's avatar
        NicolasKheirallah
        MVP
        That's only possible via PowerShell, check my script above. It should disable it for all sites that you've got already. 🙂
      • NicolasKheirallah's avatar
        NicolasKheirallah
        MVP

        jcgonzalezmartin 

         

        Yeah Juan you're probably right! :smile:

        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 :smile: :

         

         

         

        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