Powershell: Recusively Check In and Publish files in a SharePoint Document Library
I have combined the scripts from Paul King ( here ) and Brijendra Gautam ( here ) to create my own version of the script. Function CheckInAndPublishFolderItemsRecusively( [Microsoft.SharePoint.SPFolder] $folder ) { # Create query object $query = New-Object Microsoft.SharePoint.SPQuery $query.Folder = $folder # Get SPWeb object $web = $folder.ParentWeb # Get SPList $list = $web.Lists[$folder.ParentListId] # Get a collection of items in the specified $folder $itemCollection = $list.GetItems($query) # Iterate through each item in the $folder foreach ($item in $itemCollection) { # If the item is a folder if ($item.Folder -ne $null) { # Call the Get-Items function recursively for ...