TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mgm tech
NA
26
2.3k
SharePoint Versioning
Sep 20 2017 11:21 AM
I have a script the pull only one site collection list and library versioning details. How do I add a loop that will call for all sites and subsites list and libraries versioning details?
$cred = Get-Credential
Connect-PnPOnline -url https://test.sharepoint.com/sites/test1 -credentials $cred
$lists = Get-PnPList
$VersioningDetails = @()
foreach($list in $lists) {
$VersioningDetails += New-Object PSObject -Property @{
'List' = $list.Title
'Require Content Approval' = $list.EnableModeration
'Versioning Enabled' = $list.EnableVersioning
'Major Version limit' = $list.MajorVersionLimit
'Draft Version limit' = $list.MajorWithMinorVersionsLimit
'Drafts visible to' = $list.DraftVersionVisibility
'Checkout required' = $list.ForceCheckout
}
}
$VersioningDetails | Select 'List', 'Require Content Approval', 'Versioning Enabled',`
'Major Version limit', 'Draft Version limit', 'Drafts visible to', 'Checkout required'`
| Export-Csv versioningdetails.csv
Reply
Answers (
1
)
Webpart Error coming while open a page
SharePoint Online to SP 2013 Authentication