Disable Content Organizer & Remove Drop Off Library in SharePoint 2013

Beim aktivieren der Enterprise Features in der Central Adminstration („Enable all sites in this installation to use the following set of features: SharePoint Server Enterprise Features“) wird auf der ganzen SharePoint Farm – in JEDER Site in JEDER Site Collection in JEDER Web Application das Content Organizer Feature (ist ein Site Feature) aktiviert und überall die Drop Off Library hinzugefügt. Diese lässt sich nicht löschen, auch nicht, wenn das Feature wieder deaktiviert wird.

Enable Enterprise Features

Chris Kent hat auf seinem Blog ein nützliches Script gepostet, das in jeder Site das Content Organizer Feature wieder deaktiviert und die Drop Off Library entfernt.

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
Param(
    [parameter(position=0)]
    [String]
        $WebApplicationURL,
    [parameter(position=1)]
    [Boolean]
        $AnalysisOnly = $true,
    [parameter(position=2)]
    [String[]]
        $ExclusionURLs
)

#Display Exclusion URL information
if($ExclusionURLs -and $ExclusionURLs.Count -gt 0) {
    Write-Host „Excluded URLs:“ -foregroundcolor green
    $ExclusionURLs | ForEach-Object {
        Write-Host “ $_“ -foregroundcolor green
    }
} else {
    Write-Host „No URL Exclusions“ -foreground cyan
}

#Display Feature Information
$feature = Get-SPFeature “DocumentRouting”
Write-Host “Feature ID for Content Organizer is called $($feature.DisplayName)“ -foregroundcolor cyan

if($AnalysisOnly) {
    Write-Host „ANALYSIS ONLY“ -foregroundcolor red
}

#Go Through Every Site
Get-SPWebApplication $WebApplicationURL | Get-SPSite -Limit ALL | Get-SPWeb -Limit ALL | ForEach-Object {

    #Check for Exclusion
    if(!($ExclusionURLs -contains $_.URL)) {
        Write-Host „$_ | $($_.URL)“ -foregroundcolor DarkCyan

        #Disable Feature if found
        if ($_.Features[$feature.ID]) {
            Write-Host “ Feature $($feature.DisplayName) Found“ -foreground green
            if(!$AnalysisOnly){
                Disable-SPFeature $feature -Url $_.Url -Force -Confirm:$false
                Write-Host “ Feature $($feature.DisplayName) Disabled” -foreground magenta
            }
        } else {
            Write-Host “ Feature $($feature.DisplayName) NOT Found“ -foreground yellow
        }

        #Delete Drop Off Library if found
        $list = $_.Lists[„DROP OFF LIBRARY“]
        if ($list) {
            Write-Host “ List $list Found” -foregroundcolor green
            if(!$AnalysisOnly){
                $list.AllowDeletion = $true;
                $list.Update()
                $list.Delete()
                Write-Host “ List $list Deleted” -foreground magenta
            }
        } else {
            Write-Host “ Drop Off Library NOT found” -foregroundcolor yellow
        }
    }

}
Write-Host “ „
Write-Host „All Done!“ -foregroundcolor yellow

 

Hier die wichtigsten Parameter, weitere Erklärungen liefert Chris in seinem Blog. (Hier klicken)

runanalysisonlyrunnoanalysisrunanalysisonlywithexclusions

runnoanalysiswithexclusions

 

 

 

Hinterlasse einen Kommentar