SharePoint 2013 - Features bez Scope

31.08.2015

Problém

Na SharePointu jsem nalezl Features, které neměly žádný Scope. Nešly odstranit, jelikož k nim chyběly soubory na disku. Občas generovaly neznámé chyby.

Příklad generované chyby

Failed on try1 to load XML document at path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Template\Features\MyProject.MyFeature\feature.xml': System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Template\Features\MyProject.MyFeature\feature.xml'.

Failed on try2 to load XML document at path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\MyProject.MyFeature\feature.xml': System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\MyProject.MyFeature\feature.xml'.

Řešení

Našel jsem nástroj, který tyto Features identifikuje, popř. s nimi může provést i deaktivace. Jmenuje se SharePoint Feature Administration and Clean Up Tool a je volně ke stažení na CodePlex.com

Dále jsem našel článek, který popisuje jak identifikovat a smazat tyto Features pomoci Power Shellu.

Výpis samostatných features

Get-SPFeature ' ? { $_.Scope -eq $null }

Odstranění samostatných features

Get-SPFeature ' ? { !$_.Scope } ' % { $_.Delete() }

Odkazy

© 2020 Olda Zátopek
Vytvořeno službou Webnode
Vytvořte si webové stránky zdarma! Tento web je vytvořený pomocí Webnode. Vytvořte si vlastní stránky zdarma ještě dnes! Vytvořit stránky