Microsoft has announced the rollout of several new enhancements to SharePoint Online team sites in Office 365. These enhancements are the Modern UX for Team Site publishing pages/new web parts and OneDrive for Business sites in SharePoint Online in Office 365. Modern lists and support for Microsoft Flow and PowerApps, Modern Document libraries, Site Contents Page of Team sites already have the modern UX. A default out-of-the-box setting is available in Office 365, SharePoint admin center to switch the Design mode to the New Modern UX or to stay Classic.
Note: We need to note that `classic’ experience is not deprecated and both `classic` and `modern` will coexist.
In addition to these, we need to control the settings to implement the new design for multiple sites in an Office 365 environment. There are PowerShell commands available that you can use to add or remove hidden features related to the new Modern UI, at Web or Site Collection level using the popular CSOM.
We need to understand the reasons to switch from Modern UX to Classic at various scope levels.
- When you have customizations that affect document library pages.
- Whenever the pages represent business-critical functionalities.
We can determine which sites and site collections have to be changed to Classic using the following PowerShell script with a CSOM.
Please follow the given steps using SharePoint Online Management Shell to enable or disable Modern UX for SharePoint Online Team sites using the CSOM model.
Step 1 – Add the assemblies to Run the following in SharePoint Online Management Shell
Add-Type -Path “C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll”
Add-Type -Path “C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.Runtime.dll”
With the latest SharePoint Online Management Shell installed the above assemblies should be in your “C:\Program Files\SharePoint Online Management Shell\” folder as shown below.
Steps 2 – We need to load the variables for your Site Collection and Web as required. Provide a global administrator credentials in the below code snippet.
Step 3 – Change the Classic experience for sites/site collections.
To change the Classic experience for document libraries on a site collection/Site Contents Page, we need to REMOVE the feature ‘E3540C7D-6BEA-403C-A224-1A12EAFEE4C4’ from Site Collection feature definition.
To switch your Site Collection to New UX, run the following code snippet:
To switch your Site Collection to Classic mode, run the following code snippet:
Step 4 – Change the Classic experience for Web/Subsites in a site collections.
To change the Classic experience for document libraries on a Web/Subsite, we need to REMOVE the feature ’52E14B6F-B1BB-4969-B89B-C4FAA56745EF’ from Website’s feature definition.
To switch your Web to New UX mode, run the following code snippet:
To switch your Web to Classic mode, run the following code snippet:
We can login to the site/site collection and test the Site Contents page on your SharePoint Online site in Office 365.
With the Modern UX in SharePoint Online in Office 365
Below picture represents the Classic UX in SharePoint Online in Office 365