How to detect classic publishing features on a SharePoint site
Is the classic publishing infrastructure enabled here?
30-second answer
$web = Get-PnPFeature -Scope Web | Where-Object { $_.DefinitionId -eq '94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb' }
$site = Get-PnPFeature -Scope Site | Where-Object { $_.DefinitionId -eq 'f6924d36-2fa8-4f0b-b16d-06b7250180fa' }
if ($web -or $site) { "Classic publishing is enabled" } else { "Not enabled" }
Two features, two scopes: PublishingSite
(F6924D36-2FA8-4F0B-B16D-06B7250180FA) at site scope, PublishingWeb
(94C94CA6-B32F-4DA9-A9E3-1F3D343D7ECB) at web scope.
What this proves
Whether the classic publishing infrastructure is activated on this site or web. Activation is a fact the product records as a feature id in the enabled-features list.
What it does not prove
- Whether anything uses it. An enabled feature is a capability, not usage. Sites carry publishing enabled for years after the last publishing page was retired.
- What turning it off would break. Deactivation has consequences the feature list does not describe; page layouts and master page settings depend on it.
PowerShell
Get-PnPFeature -Scope Web |
Select-Object DisplayName, DefinitionId |
Sort-Object DisplayName
Collect the full id list once and let the interpretation live elsewhere: which GUID means what is a documented claim, and it changes on documentation's schedule, not the collector's.
Example output
DisplayName DefinitionId
----------- ------------
MDSFeature 87294c72-f260-42f3-a41b-981a2ffce37a
PublishingWeb 94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb
Explanation
Publishing marks a site as classic-built in the way that most resists modernisation: it brings page layouts, master pages and an editing model that modern pages do not have. Its presence is the single most reliable signal that a site was built as a classic publishing portal, and Microsoft documents it as unsupported territory for the modern experience.
Production considerations
Get-PnPFeature -Scope Siteand-Scope Webare two different lists; checking only one misses half the answer.- Site read access is enough.
- Compare ids case-insensitively; the product is not consistent about casing across APIs.
References
- Classic publishing sites and the modern experience (Microsoft Learn)
- SPMT supported site features (Microsoft Learn)
- Get-PnPFeature (PnP PowerShell)
