We're planning to migrate our SharePoint from 2013 to 2019 via 2016 bridge farm. Will documents with no-checked in version will migrate ? If I use sharegate or any third-party tool, it is mandated to check in the files .


You will need to check in the documents in order to migrate them along with the content database. You can use PowerShell to do the trick.

Here’s a sample script (web application scope) for your reference:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Set the Web application URL

#Get the Web Application       
$WebApp = Get-SPWebApplication $WebAppURL

#Get all Site collections from the web application
$SitesCollection  = $WebApp.Sites

#Enumerate all site collections in the web application
Foreach($Site in $SitesCollection) {

    #Loop through each sub-site of the site collection
    ForEach($Web in $Site.AllWebs) {
        Write-host -f Yellow "Searching for Checked out Files in Web:" $Web.Url

        #Loop through each list
        ForEach($List in $Web.Lists) {
            #Get Checked out files with no checkin versions
            $CheckedOutFiles = $List.CheckedOutFiles

            #Loop through each checked out File
            ForEach ($File in $CheckedOutFiles) {
                Write-Host -f Yellow "`t '$($File.LeafName)' at $($File.Url) is Checked out by: $($File.CheckedOutByName)"

                #Take ownership of the file

                #Check in the file
                $List.GetItemById($File.ListItemId).File.Checkin("Checked in by Administrator")
                Write-host -f Green "`t Took Ownership and Checked in the File!"

Reference: PowerShell to Manage Files Which Have No Checked in Version in SharePoint.

| 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.