Last active
December 24, 2015 17:29
-
-
Save devendrasv/6836113 to your computer and use it in GitHub Desktop.
Get list of Document libraries where content approval for submitted items is yes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Load powershell snapin | |
| Add-PSSnapin "Microsoft.SharePoint.PowerShell" | |
| #Get site collection details | |
| $s = Get-SPSite http://spjourney | |
| #Get all web sites in the site collections | |
| $wc = $s.AllWebs | |
| foreach($w in $wc) | |
| { | |
| #loopthrouh the lists and libraries in the site | |
| foreach($l in $w.Lists) | |
| { | |
| #Check for only document libraries | |
| if($l.BaseTemplate -eq "DocumentLibrary") | |
| { | |
| #Check whether the Require content approval for submitted items is yes | |
| if($l.EnableModeration) | |
| { | |
| Write-Host $l.Title"(Web: "$w.Title")" | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment