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
PowerShell for every List in each Web of a SiteCollection
28 February, 2016
PowerShell for every List in each Web of a SiteCollection

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

37 Comments
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
0
28 February, 2016
Publish SharePoint 2013 Workflow Globally

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

No comment
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
0
Fix SharePoint 2013 UPS Stuck on Starting
4 July, 2018
Fix SharePoint 2013 UPS Stuck on Starting

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

54 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
24 June, 2013
Customizing the Quick Launch

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

368 Comments
0
24 June, 2013
Enable Fly-Out for Quick Launch

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

96 Comments
0
Creating a view for each Document Library in a Site Collection
3 February, 2016
Creating a view for each Document Library in a Site Collection

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

135 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

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