Raymond Tishenko

Raymond Tishenko


Thoughts, ideas and general ramblings of a SharePoint and Infrastructure Consultant in Vancouver, BC

I'm addicted to coffee. There, I said it.

Share


Tags


Set Classic View as default on SharePoint 2019 sites

Return SharePoint 2019 lists and libraries to the classic view from modern experience with PowerShell

If you've upgraded from SharePoint 2016 to SharePoint 2019 you'll find lists and libraries have the Modern Experience enabled by default, with an option to 'Return to classic SharePoint' at the bottom of the Quick Launch:

If relatively few users want to return to the classic SharePoint view, manually clicking this may work; however, if as an organization or perhaps department you'd prefer to not see the Modern Experience this manual approach isn't a solution. Even more so due to the 'Exit classic experience' link that is displayed in the Quick Launch that is enticing users to return to the future:

The Switch the default experience for lists or document libraries from new or classic support page describes this process and also mentions that you can change the experience for all lists and libraries in a Site by way of Site Collection Features.

However, what isn't clear is that the feature does not exist unless it's added via PowerShell.

The following script will add the feature to the Site Collection, and enable it to set the 'Classic SharePoint' experience for lists and libraries:

Add-PSSnapin microsoft.sharepoint.powershell -ea 0
$site = Get-SPSite http://server/sites/team

#Disable modern Lists and libraries at the Site Collection Level
$featureguid = new-object System.Guid "E3540C7D-6BEA-403C-A224-1A12EAFEE4C4"
$site.Features.Add($featureguid, $true)

After running this we have the added benefit of the 'Exit classic experience' link no longer displaying, which makes sense as we'd expect this intentional change to affect all users and be longer lasting:

If at some point we want to return to the Modern Experience for the site we can simply run the following snippet and revert the behaviour:

Add-PSSnapin microsoft.sharepoint.powershell -ea 0
$site = Get-SPSite http://server/sites/team

#Re-enable the modern experience at the site collection Level.
$featureguid = new-object System.Guid "E3540C7D-6BEA-403C-A224-1A12EAFEE4C4"
$site.Features.Remove($featureguid, $true)

So there we have it - an upgrade from SharePoint 2016 to SharePoint 2019 results in lists and libraries with the new Modern Experience. Many organizations may wish to stick with the Classic SharePoint experience for a while, and we can update the site collection to revert to the old view using a simple PowerShell script.

I'm addicted to coffee. There, I said it.

View Comments