Sometimes you want to hide the page views and like button on a modern page.

You have two options

  • Disable at the tenant level
  • Disable at the site collection level

You can perform the above options only with PowerShell at this moment on modern team sites because of a bug. It can however be disabled on a Communication sites from the page.

Disable at the Tenant level

If you have installed SPO PowerShell module, use

Set-SPOTenant -SocialBarOnSitePagesDisabled $true

or using PnP PowerShell

Set-PnPTenant -SocialBarOnSitePagesDisabled $false

Disable at the Site Collection level

To disable it at site collection level, run:

Set-SPOSite -Identity <site-coll-url> -SocialBarOnSitePagesDisabled $true