Requirement: Disable Social Bar links (Like, Comment, Views, Save for later) in SharePoint Online Modern Site Pages
PowerShell to Hide Social Bar Links in SharePoint Online Site Collection:
The Social Bar is a new feature in SharePoint Online modern pages that lets users like, comment, and see the number of views. Run this PowerShell script in SharePoint Online Management Shell to disable the social bar. Make sure you set the parameters accordingly.
#Set Parameters $AdminCenterURL="https://crescent-admin.sharepoint.com" $SiteURL = "https://crescent.sharepoint.com/sites/marketing" #Connect to SharePoint Online Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential) #Disable Social Bar on Site Pages Set-SPOSite -Identity $SiteURL -SocialBarOnSitePagesDisabled $True
Similarly, To disable the SharePoint Online Social bar at the Tenant level, use:
Set-SPOTenant -SocialBarOnSitePagesDisabled $true
Here is another post on disabling comments on Modern pages in SharePoint Online: SharePoint Online: Disable Page Comments in Modern Sites using PowerShell