Commands › SharePoint Online

Set-SPOWebClassicPageModernViewRendering

SharePoint Online Microsoft.Online.SharePoint.PowerShell Set-*

This cmdlet sets or clears the modern view rendering setting for classic pages on a web.

Quick start script

# Set-SPOWebClassicPageModernViewRendering — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SPOWebClassicPageModernViewRendering
$before | Format-List

# 3. Make the change (dry run first)
Set-SPOWebClassicPageModernViewRendering -Operation <SPOWebClassicPageModernViewRendering+WebClassicPageModernViewRenderingOperation> -WebUrl <String> -WhatIf
Set-SPOWebClassicPageModernViewRendering -Operation <SPOWebClassicPageModernViewRendering+WebClassicPageModernViewRenderingOperation> -WebUrl <String>

# 4. Verify and diff
$after = Get-SPOWebClassicPageModernViewRendering
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-SPOWebClassicPageModernViewRendering -WebUrl <String> -Operation <WebClassicPageModernViewRenderingOperation> [-WhatIf] [-Confirm]
 [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Operation SPOWebClassicPageModernViewRendering+WebClassicPageModernViewRenderingOperation yes Specifies the change to make to this web. `Enable` stores an explicit opt-in, `Disable` stores an explicit opt-out, and `UseTenantDefault` removes the override so the tenant-level rollout applies again. Using tenant...
-WebUrl String yes Specifies the absolute URL of the web to update. The URL must point to an existing web. A URL that points to a page, a document library, or a web that doesn't exist returns an error.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.