Switch the default experience for site from new or classic SharePoint Online Office 365

This SharePoint Online tutorial explains, how to switch the default experience for a site from new or classic SharePoint Online Office 365.

Suddenly I observed there is a change in look and feel for site contents. The new look and feel look good but few customers might not like the new look if there is a custom master page applied to system pages as well. OK. So we have multiple options to revert it with classic mode.

Learn SharePoint Modern Experience.

Navigate to Admin centers, further click on SharePoint.

Switch the default experience for site from new or classic SharePoint

Click on Settings -> SharePoint Lists and Libraries experience, select Classic experience which will be applicable to all site collections.

Switch the default experience for site from new or classic SharePoint online

We have to click on “Return to Classic Sharepoint” which will show the site contents with the custom master page in classic view.

Switch the default experience for site from new or classic SharePoint Online Office 365

Now the scenario is you will have to apply the changes only for specific sites. Let’s do some CSOM +PowerShell scripting to achieve the same.

Please find below the PowerShell script and execute it against your site.

This feature is site level feature and you will have to do it for all the subsites including your parent/root site.

cls
$0 = $MyInvocation.MyCommand.Definition
$dp0 = [System.IO.Path]::GetDirectoryName($0)
$username = "****@**.com"
$password = "*****"
$url =’https://*****/sites/test’
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force
# connect/authenticate to SharePoint Online and get ClientContext object..
$clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($url)
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePassword)
$clientContext.Credentials = $credentials

Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Publishing.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Taxonomy.dll"

if (!$clientContext.ServerObjectIsNull.Value)
{
Write-Host "Connected to SharePoint Online site: ‘$Url'" -ForegroundColor Green
$web = $clientContext.Web
$clientContext.Load($web)
$clientContext.ExecuteQuery()
Write-Host "Connected to SharePoint Online site: ‘$web.Url'" -ForegroundColor Green
$featureguid = new-object System.Guid "52E14B6F-B1BB-4969-B89B-C4FAA56745EF"
$web.Features.Add($featureguid, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None);
$clientContext.ExecuteQuery();
}

You may like following SharePoint PowerShell tutorials:

Here we learned, how to switch the default experience for a site from new or classic SharePoint Online Office 365.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>