Is there a way to disable the modern experience for the site collection and not all of SharePoint? I googled and saw where to disable the Modern and switch back to Classic at the admin level, but I don't want this for all of SharePoint. I don't want to completely miss out on all of the new things coming.

up vote 7 down vote accepted

It is possible to do at the site collection level or at the web level, it is only settable by CSOM/PowerShell. This is how we manage it in our PowerShell module for working with SharePoint Online.

function Set-NewExperience{
    <#
    .Synopsis
       Sets the document library experience for a site or web
    .DESCRIPTION
       Sets the document library experience for a site or web
    .EXAMPLE
       The following would disable the new experience for an entire site collection
       Set-NewExperience -Url "https://tenant.sharepoint.com/teams/eric" -Scope Site -State Disabled
    .EXAMPLE
       The following would disable the new experience for a single web
       Set-NewExperience -Url "https://tenant.sharepoint.com/teams/eric" -Scope Web -State Disabled
    .EXAMPLE
       The following would enable the new experience for an entire site collection
       Set-NewExperience -Url "https://tenant.sharepoint.com/teams/eric" -Scope Site -State Enabled
    .Link
    https://support.office.com/en-us/article/Switch-the-default-for-document-libraries-from-new-or-classic-66dac24b-4177-4775-bf50-3d267318caa9
    #>
    Param
    (
        [Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
        [string]$Url,
        [Parameter(Mandatory=$true)][ValidateSet("Site", "Web")]
        [string]$Scope,
        [Parameter(Mandatory=$true)][ValidateSet("Enabled", "Disabled")]
        [string]$State

    )

    Begin{
        $context = New-Object Microsoft.SharePoint.Client.ClientContext($Url)
        $context.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($credential.UserName, $credential.Password)
    }
    Process{

        if($Scope -eq "Site"){
            # To apply the script to the site collection level, uncomment the next two lines.
            $site = $context.Site
            $featureguid = new-object System.Guid "E3540C7D-6BEA-403C-A224-1A12EAFEE4C4"
        }
        else{
            # To apply the script to the website level, uncomment the next two lines, and comment the preceding two lines.
            $site = $context.Web
            $featureguid = new-object System.Guid "52E14B6F-B1BB-4969-B89B-C4FAA56745EF" 
        }
        if($State -eq "Disabled")
        {
            # To disable the option to use the new UI, uncomment the next line.
            $site.Features.Add($featureguid, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None)
            $message = "New library experience has been disabled on $URL"
        }
        else{
            # To re-enable the option to use the new UI after having first disabled it, uncomment the next line.
            # and comment the preceding line.
            $site.Features.Remove($featureguid, $true)
            $message = "New library experience has been enabled on $URL"
        }
        try{
            $context.ExecuteQuery()
            write-host -ForegroundColor Green $message
        }
        catch{
            Write-Host -ForegroundColor Red $_.Exception.Message
        }
    }
    End{
        $context.Dispose()    
    }
}
  • Hi Eric, do you know if this is still working? Created a new site collection, changed the links and un-commented for the site collection, ran the script, everything went smoothly, opened the site collection and everything the same as before. – Yugo Jun 28 '17 at 20:15
  • @Yugo Sorry, I'm not sure. The pace of change in SPO is staggering, in 9 months this could very well be invalid. I don't have a means to test this any longer. – Eric Alexander Jun 29 '17 at 13:56
  • Thank you very much for the information, it's definitely not working for me but wanted to double check and see if I may be doing something wrong :). It's unbelievable that Microsoft to this day doesn't allow for a single site collection to use the modern experience in order to test out the changes without breaking everything in my production sites. I really enjoy the changes in the libraries but it breaks the whole look and feel as you switch from page to documents. – Yugo Jun 29 '17 at 14:48
  • Confirming what @Yugo said. As of August 2017, I am disabling this feature on a single site collection, and the Modern look continues appearing. – hamboy Aug 8 '17 at 3:20
  • A lot has changed in nearly a year, this may no longer be functioning as desired or MS might have broken something or altered how it works. – Eric Alexander Aug 8 '17 at 20:04

You can now set this for individual lists and libraries by going to list/library settings > Advanced Settings > List Experience.

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.