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?

2 Answers 2


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

  • 1
    shouldnt it be disable? the last line.
    – variable
    Commented Apr 7, 2014 at 6:49
  • Thnx for poiting out ..edited
    – Unnie
    Commented Apr 7, 2014 at 10:04
  • 1
    If you really have a lot of webs, you should consider using the -Confirm:$False parameter with Disable-SPFeature to avoid prompting each time.
    – pholpar
    Commented Nov 3, 2014 at 7:04

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!


# 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

# register Feature to ConfigDB
Install-SPFeature MDSFeature

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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