Dan Sanders
  • Home
  • About
  • Contact
  • – PowerShell
  • – SharePoint
  • – Workflow
Copyright © 2016 Dan Sanders. All Rights Reserved.
Dan Sanders
  • Home
  • About
  • Contact
  • – PowerShell
  • – SharePoint
  • – Workflow

Remove Drop Off Library and fix up the QuickLaunch in SharePoint 2010

byDan Sanders inPowershell, SharePoint posted17 September, 2013
67
0

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable Features’ button which inevitably enabled all SharePoint Server Standard Features across all Sites, Site Collections and Web Applications. This was the first time I hit this button and didn’t think much of it until I discovered the Drop off Library in the Quick Launch across all sites!
The Drop off Library cannot be simply removed through its Library Settings. Even if you deactivate the Site Feature that put it there. but who would want to manually remove the Library across a ton of site and then fix up the QuickLaunch respectively (The ‘Libraries’ menu item is left behind if it has no child items)

Here’s how to fix it with PowerShell.

Run the SharePoint 2010 PowerShell Management Shell as your Farm Administrator Account

To remove the Drop-Off Libraries on all SharePoint 2010 sites in a Site Collection (note; this will remove all Drop-off Library links from the QL since they wont exist):

Get-SPSite -Identity http://sitecollectionurl | Get-SPWeb -Limit ALL | ForEach-Object {
Disable-SPFeature –Identity DocumentRouting –url $_.Url –Confirm:$false
$dropOffLibrary = $_.Lists["Drop Off Library"]
$dropOffLibrary.AllowDeletion = “True”
$dropOffLibrary.Update()
$dropOffLibrary.Delete()
}

To remove all ‘Library’ QuickLaunch items if it has no child:

Get-SPSite http://sitecollectionurl | get-spweb -limit all | foreach-object{
$webURL = $_.url
$web = Get-SPWeb $webURL
$pubWeb = [Microsoft.Sharepoint.Publishing.PublishingWeb]::GetPublishingWeb($Web)
$qlNav = $pubWeb.Navigation.CurrentNavigationNodes
$qlHeading = $qlNav | where { $_.Title -eq “Libraries” }
$qlLibraries = $qlHeading.Children
if($qlLibraries.Count -eq 0)
{
$qlHeading.delete()
}
else
{
$qlLibraries | Select Title,ID
$count = $qlLibraries.Count
write-host “Other Libraries are listed on $url. Count = $count”
}
$pubWeb.Update()
$web.Dispose
}
PowerShellSharePointSharePoint 2010
Share this :

Related Posts

0
Content Database and Site Collection Report
11 December, 2018
Content Database and Site Collection Report

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable...

No comment
0
Showcase: SharePoint 2013 Global Reusable Workflow using REST
14 March, 2016
Showcase: SharePoint 2013 Global Reusable Workflow using REST

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable...

92 Comments
0
Associate your 2013 workflow to every library/list through PowerShell
29 February, 2016
Associate your 2013 workflow to every library/list through PowerShell

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable...

No comment
0
Remote PowerShell with SharePoint 2010 Kerberos
31 July, 2013
Remote PowerShell with SharePoint 2010 Kerberos

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable...

224 Comments
7
Enabling multiple Document Set views
20 September, 2017
Enabling multiple Document Set views

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable...

2 Comments
0
25 June, 2013
Deploying SharePoint 2010 Solutions with Powershell

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable...

20 Comments
2
SharePoint Foundation 2013 Shopping Cart
30 August, 2016
SharePoint Foundation 2013 Shopping Cart

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable...

1 Comment
0
Quick Edit button grayed out
3 February, 2016
Quick Edit button grayed out

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable...

No comment
0
Adding a column to a Content Type (CT) at a library level with PowerShell.
10 February, 2016
Adding a column to a Content Type (CT) at a library level with PowerShell.

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable...

67 Comments
0
Libraries with no Default View
27 January, 2016
Libraries with no Default View

While provisioning a new Service App in SharePoint 2010 the other day I hit the ‘Enable...

26 Comments

Leave a Comment! Cancel reply

You must be logged in to post a comment.

Recent Posts

  • SharePoint Add-in 401 Unauthorized
  • Content Database and Site Collection Report
  • SharePoint helpful hidden URLs

Tags

Config (1) Content Types (2) Design (3) Document Libraries (7) Document Sets (1) How-To (1) Lists (4) Office365 (1) PnP (1) PowerShell (12) Quick Edit (2) REST (1) SharePoint (11) SharePoint 2010 (11) SharePoint 2013 (14) SharePoint Foundation (2) SharePoint Online (1) SP2010 Workflow (2) SP2013 Workflow (3) Systems (2) User Profile Service (1) Views (5) Windows Server (1) Workflow (2)

Archives

  • November 2020
  • December 2018
  • September 2018
  • July 2018
  • September 2017
  • August 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • September 2013
  • July 2013
  • June 2013