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

Libraries with no Default View

byDan Sanders inPowershell, SharePoint posted27 January, 2016
0
0
Libraries with no Default View

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint 2013 lost their default view.

Using SharePoint Designer I can see the allitems.aspx available in the library files, however, it wasn’t available as a view in the library settings.

Linking direct to allitems.aspx worked, however, clicking directly on the Document Library produces this error message:

To view your documents, please navigate to the library and select the ‘Open with Explorer’ action. If the ‘Open with Explorer’ action is not available, then your system may not support it.

The issue also caused a problem with a 3rd party add on for Outlook (MacroView) that did not show the Library in the tree view because it had no default view.

Using PowerShell we can return a list of Libraries in a Site Collection that has no default view.

We can then set a new default view or create a new one.

$Site = Get-SPSite http://Intranet/
$Webs = $Site.AllWebs
foreach($Web in $Webs)
{
   foreach($List in $Web.Lists)
   {
      if($List.BaseTemplate -eq "DocumentLibrary")
      {
        if(!$List.DefaultView)
        {
          Write-Host "Web: " $Web.Title  " - Library: " $List.Title 
        }
      }
   }
}
Document LibrariesPowerShellSharePointSharePoint 2013Views
Share this :

Related Posts

0
17 September, 2013
Remove Drop Off Library and fix up the QuickLaunch in SharePoint 2010

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint...

No comment
0
SharePoint Foundation 2013 Help-desk System
30 August, 2016
SharePoint Foundation 2013 Help-desk System

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint...

No comment
0
25 June, 2013
Deploying SharePoint 2010 Solutions with Powershell

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint...

No comment
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

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint...

No comment
0
28 April, 2016
Disable Loopback check – UPA Picture Sync Error

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint...

No comment
0
4 February, 2016
Adding a ContentType to each Library with PowerShell

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint...

No comment
2
SharePoint Foundation 2013 Shopping Cart
30 August, 2016
SharePoint Foundation 2013 Shopping Cart

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint...

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.

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint...

No comment
0
Quick Edit button grayed out
3 February, 2016
Quick Edit button grayed out

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint...

No comment
0
Enabling multiple Document Set views
20 September, 2017
Enabling multiple Document Set views

For some reason, a number of Document Libraries on a Farm I recently upgraded to SharePoint...

No comment

Leave a Comment! Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Enabling multiple Document Set views
  • SharePoint Foundation 2013 Shopping Cart
  • SharePoint Foundation 2013 Help-desk System

Tags

Config (1) Content Types (2) Design (3) Document Libraries (7) Document Sets (1) How-To (1) Lists (4) PowerShell (10) Quick Edit (2) REST (1) SharePoint (11) SharePoint 2010 (11) SharePoint 2013 (13) SharePoint Foundation (2) SP2010 Workflow (2) SP2013 Workflow (3) Systems (2) Views (5) Windows Server (1) Workflow (2)

Archives

  • September 2017
  • August 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • September 2013
  • July 2013
  • June 2013