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

PowerShell for every List in each Web of a SiteCollection

byDan Sanders inPowershell, SharePoint posted28 February, 2016
37
0
PowerShell for every List in each Web of a SiteCollection

Use the below if needing to target each Web or List in a Site Collection

$Site = Get-SPSite http://SiteCollection/
$Webs = $Site.AllWebs
foreach($Web in $Webs)
{
    #Code for each Web.

    ### Target Each List in current web
    $Weblists = $Web.Lists
    for ($i = 0; $i -lt $WebLists.Count; $i++)
    {
        $list = $web.Lists[$i]
        #Code for each list.
    }
    ### End of lists
}
$site.dispose()
$web.dispose()
$webs.dispose()
Document LibrariesListsPowerShellSharePointSharePoint 2010SharePoint 2013
Share this :

Related Posts

0
25 June, 2013
Deploying SharePoint 2010 Solutions with Powershell

Use the below if needing to target each Web or List in a Site Collection

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

Use the below if needing to target each Web or List in a Site Collection

26 Comments
0
28 April, 2016
Disable Loopback check – UPA Picture Sync Error

Use the below if needing to target each Web or List in a Site Collection

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

Use the below if needing to target each Web or List in a Site Collection

224 Comments
0
SharePoint Foundation 2013 Help-desk System
30 August, 2016
SharePoint Foundation 2013 Help-desk System

Use the below if needing to target each Web or List in a Site Collection

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

Use the below if needing to target each Web or List in a Site Collection

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.

Use the below if needing to target each Web or List in a Site Collection

67 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

Use the below if needing to target each Web or List in a Site Collection

135 Comments
0
24 June, 2013
Customizing the Quick Launch

Use the below if needing to target each Web or List in a Site Collection

368 Comments
0
Quick Edit button grayed out
3 February, 2016
Quick Edit button grayed out

Use the below if needing to target each Web or List in a Site Collection

No comment

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