Need some automated way for publishing the content throughout the site within the one action using some commands, powershell or some custom code or any utility available for SharePoint 2013.

Any suggestions appreciated.

  • Maybe you could justs disable the approval requirement in the target libraries, then renable it ? – Steve B Sep 1 at 12:22

There is a automated script available at codeplex. This script will automate the approval and publishing of SharePoint contents.


| improve this answer | |
  • tried that. does that support sp 2013 also? – Hardik Kothari Sep 24 '14 at 8:33
  • This script is developed for 2010 editions. It will not work for 2013 unless there is an update to the script. Please add a tag "2013" to your question so that people may understand the requirement is for SharePoint 2013 edition. Thanks. – Zakir HC Sep 24 '14 at 8:36
  • sorry for that but since i had 5tags already so din't include. anyways question edited. Thanks! – Hardik Kothari Sep 24 '14 at 8:39

you can download PnP Powershell and install in your client (or any os that can see site collection) and Run this code:

Connect-PnPOnline -Url http://sitecollection -Credentials(Get-Credential)
$list=Get-PnPList "Master Page Gallery"
$items=Get-PnPListItem -List $list

foreach($item in $items)
 Set-PnPFileCheckedIn -Url $url -CheckinType MajorCheckIn -Comment "Comment Here"

PnP powershell document: https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.