Disable minimal download strategy using powershell
-
07-02-2021 - |
Question
I am trying to disable the minimal download strategy but the feature is not available even though the redirection persists.
This site is a users Blog site. The Blog link from the MySite redirects here: Blog/_layouts/15/start.aspx#/default.aspx
MDS is disabled at the top-level site. When I execute the following command:
Disable-SPFeature -identity "87294c72-f260-42f3-a41b-981a2ffce37a" -URL <weburl>/personal/<userid>/Blog
I get the following:
Disable-SPFeature : Feature '87294c72-f260-42f3-a41b-981a2ffce37a' is not activated at this scope.
At line:1 char:1
+ Disable-SPFeature -identity "87294c72-f260-42f3-a41b-981a2ffce37a" -URL http://i ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Share...tDisableFeature:SPCmdletDisableFeature) [Disable-SPFeature], Invali
dOperationException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletDisableFeature
This is a list with all features int he blog: PS C:\Windows\system32> Get-SPFeature -Web $blog
DisplayName Id CompatibilityLevel Scope
----------- -- ------------------ -----
WebPageLibrary 00bfea71-c796-4402-9f2f-0eb9a6e71b18 15 Web
BizAppsListTemplates 065c78be-5231-477e-a972-14177cc5b3c7 15 Web
IssuesList 00bfea71-5932-4f9c-ad71-1557e5751100 15 Web
SPSBlog d97ded76-7647-4b1e-b868-2af51872e1b3 15 Web
PremiumWeb 0806d127-06e6-447a-980e-2e90b03101b8 15 Web
WorkflowHistoryList 00bfea71-4ea5-48d4-a4ad-305cf7030140 15 Web
ReportListTemplate 2510d73f-7109-4ccc-8a1c-314894deeb3a 15 Web
PromotedLinksList 192efa95-e50c-475e-87ab-361cede5dd7f 15 Web
NoCodeWorkflowLibrary 00bfea71-f600-43f6-a895-40c0de7b0117 15 Web
FollowingContent a7a2793e-67cd-4dc1-9fd0-43f61581207a 15 Web
SurveysList 00bfea71-eb8a-40b1-80c7-506be7590102 15 Web
GridList 00bfea71-3a1d-41d3-a0ee-651d11570120 15 Web
GanttTasksList 00bfea71-513d-4ca0-96c2-6a47775c0119 15 Web
LinksList 00bfea71-2062-426c-90bf-714c59600103 15 Web
MobilityRedirect f41cc668-37e5-4743-b4a8-74d1db3fd8a4 15 Web
workflowProcessList 00bfea71-2d77-4a75-9fca-76516689e21a 15 Web
TasksList 00bfea71-a83e-497e-9ba0-7a5c597d0107 15 Web
TeamCollab 00bfea71-4ea5-48d4-a4ad-7ea5c011abe5 15 Web
BlogSiteTemplate faf00902-6bab-4583-bd02-84db191801d8 15 Web
AccSvcAddAccessApp d2b9ec23-526b-42c5-87b6-852bd83e0364 15 Web
BaseWeb 99fe402e-89a0-45aa-9163-85342e865dc8 15 Web
WorkflowTask 57311b7a-9afd-4ff0-866e-9393ad6647b1 15 Web
HierarchyTasksList f9ce21f8-f437-4f7e-8bc6-946378c850f0 15 Web
TaskListNewsFeed ff13819a-a9ac-46fb-8163-9d53357ef98d 15 Web
AnnouncementsList 00bfea71-d1ce-42de-9c63-a44004ce0104 15 Web
PictureLibrary 00bfea71-52d4-45b3-b544-b1c71b620109 15 Web
WorkflowServiceStore 2c63df2b-ceab-42c6-aeff-b3968162d4b1 15 Web
ContactsList 00bfea71-7e6d-4186-9ba8-c047ac750105 15 Web
CustomList 00bfea71-de22-43b2-a848-c05709900100 15 Web
DocumentLibrary 00bfea71-e717-4e80-aa17-d0c71b360101 15 Web
DiscussionsList 00bfea71-6a49-43fa-b535-d15c05500108 15 Web
DataSourceLibrary 00bfea71-f381-423d-b9d1-da7a54c50110 15 Web
DataConnectionLibrary 00bfea71-dbd7-4f72-b8cb-da7ac0440130 15 Web
ExternalList 00bfea71-9549-43f8-b978-e47e54a10600 15 Web
EventsList 00bfea71-ec85-4903-972d-ebe475780106 15 Web
XmlFormLibrary 00bfea71-1e1d-4562-b56a-f05371bb0115 15 Web
Solution
First, I had to add my account in the User Policy for the Web application: CA -> Manage Web Application -> User Policy -> Add user
Second I tried the following commands and it worked:
$web = Get-SPWeb <site>
$web.EnableMinimalDownload = $false
$web.Update()
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange