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
26
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
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...

67 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

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

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

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

92 Comments
0
24 June, 2013
Customizing the Quick Launch

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

368 Comments
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...

30 Comments
7
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...

2 Comments
0
Fix SharePoint 2013 UPS Stuck on Starting
4 July, 2018
Fix SharePoint 2013 UPS Stuck on Starting

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

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

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

96 Comments
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...

73 Comments
0
Remote PowerShell with SharePoint 2010 Kerberos
31 July, 2013
Remote PowerShell with SharePoint 2010 Kerberos

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

224 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