Manage SharePoint Online new experience using a Powershell script

Business Context

One of our customers recently asked us to disable SharePoint’s new experience for his Office 365, but only for a given set of sites. By default, this new experience is activated for the entire site collection.

Key Information

  • Did you know that the activation and disabling process of the new experience can be done directly from the SharePoint Admin Center? See Figure 1 below. Changing this setting from the Admin Center affects however every lists and libraries from all site collections.

SharePoint

 Fig. 1: Screenshot of the New Experience activation/disabling option in the SharePoint Online  Admin Center

  • Should you wish o go back to the Classic Experience for the entire site collection, it can also be done by clicking on the option ”Return to classic SharePoint”. See Figure 2 below.

SharePoint

Fig. 2: Option to return to the Classic Experience

  • You would like to apply your options to only a subset of your sites? No problem. This action can be done on a more granular level by managing it at the lists/librairies level. (See Figure 3)
    1. Go to the document Library, then to the list setup option
    2. Click on the link “Advanced Settings”
    3. Under the section “List experience”, choose the desired option among the offered choices:

SharePoint

Fig. 3: Setting up of a new experience at the list/library level.

  • New Experience before/after view of the library
Before After
SharePoint SharePoint

 

Disabling at the site collection level

Prerequisites

Option 1

  1. Open a Powershell console (SharePoint Online Management Shell)
  2. Paste the following code. The script below will enable you to disable the new experience for the site collection https://[tenant].sharepoint.com/sites/siteurl

SharePoint

Option 2

There is also another way you can disable the new experience with Powershell. Just follow the instructions here provided by Microsoft: https://support.office.com/en-us/article/Switch-the-default-experience-for-lists-or-document-libraries-from-new-or-classic-66dac24b-4177-4775-bf50-3d267318caa9?ui=en-US&rs=en-US&ad=US

Disabling of the new experience

SharePoint

NOTE:

If you have previously apply:

  • the classic experience at the list/data library level, or
  • the new experience at the administration console level of SharePoint online; and
  • if you launch the script to activate the new experience, the new experience will not be reactivated for this list/library. You will need to activate the new experience again at the list/ library settings level.

Going back to the SharePoint Standard view

Every time you click on the option Return to SharePoint Standard view yo go back to the classic experience, a cookie will be generated to safeguard this information: splnu

To quickly return to the new experience, simply delete the cookie!

SharePoint

Useful Links

Close Menu