Question

We have got a web application with 400 site collections and multiple sites, is there a way to turn off the MDS feature for entire web application?

Was it helpful?

Solution

You can try below code to Deactivate MDS feature for entire web application.

$webApp = Get-SPWebApplication -Identity http://sp2010
$siteCollection =$webApp | Get-SPSite -limit all 

foreach ($site in $siteCollection)
{
$webs = $site | Get-SPweb -limit all
foreach ($web in $webs)
    {
    $url = $web.URL
    write-host "Web URL = " $url -foregroundcolor "blue"
    Disable-SPFeature -Identity  "87294c72-f260-42f3-a41b-981a2ffce37a" -url $url -Confirm:$False
    }

}

OTHER TIPS

PowerShell below will update the current farm “MDSFeature” XML to disable for all newly created site collections and child webs. If you need to support IE8 and older browsers this can be helpful. The feature GUID technically remains active but won’t do anything with missing DLL assembly detail. After desktops upgrade (IE11/Win8) then this change can be reversed with a simple file copy “ORIG” back to “XML.” Hope this helps!

http://www.spjeff.com/2015/02/13/knee-cap-mds-disable-for-new-and-current-sites/

# Disable MDS - run once per farm
# unregister Feature definition from ConfigDB
Uninstall-SPFeature MDSFeature -Force -Confirm:$false

# backup current Feature XML
$path = "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\MDSFeature\feature.xml"
Copy-Item $path "$path-orig"

# modify Feature XML to suppress DLL assembly detail  (still registered, but unable to run)
[xml] $x = Get-Content $path
$x.Feature.RemoveAttribute("ReceiverClass")
$x.Feature.RemoveAttribute("ReceiverAssembly")
$x.Save($path)

# register Feature to ConfigDB
Install-SPFeature MDSFeature
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top