StevensNet.com

...Because someone's gotta tell the story...

Blogs

To return to the main Blog List, click Full Blog Listing.

Tags

PowerShell
SharePoint
Technical

SharePoint and document uploads, checking in.

Wednesday, June 3, 2015 in Technical Articles (Views: 2325)

Seems like the more I use SharePoint, the more it absolutely annoys me. When uploading documents into a library, I see they are all checked out to me. While this is the case, nobody else can see any of these documents. You can edit and check in these documents one by one, or...

PowerShell to the rescue.

$spWeb = Get-SPWeb http://yoursitelocation
$listName = "Your List Name"
$list = $spWeb.Lists |? {$_.Title -eq $listName}
foreach ($item in $list.Items)
{
$itemFile = $item.File
if( $itemFile.CheckOutStatus -ne "None" )
{
$itemFile.CheckIn("Your comments here")
}
}
$spWeb.Dispose()

Another annoyance conquered. SharePoint - the gift that just keeps on giving.

 

Related Blogs You May Be Interested In:


To leave a comment, please log in and/or register.