SharePoint 2013 Undocheckout page using PowerShell

In this post, we will discuss how we can do undo check out a page using PowerShell in SharePoint 2013. Recently we face one issue in one of the migration project. Some pages were coming to check out by some people and when we try to do check-in, overwrite check-out or discard check out, nothing worked for us.

Also, you can read:
Generate URL using a Calculated column in SharePoint 2013 List

Office 365 Calendar Add-in by Virto Software Product Review

The maximum number of web parts for all zones on this page has been exceeded error in SharePoint 2013

Below is the PowerShell script you can use to UndoCheckOut using PowerShell for SharePoint 2013. You can pass the particular page URL to do undo checkout.

Add-PSSnapin Microsoft.SharePoint.PowerShell

$spWeb = Get-SPWeb(“https://SiteURL/”)

$spFile = $spWeb.GetFile(“https://SiteURL/Pages/MyTestpage.aspx”)


$spFile.CheckIn(“Checkin Done”[Microsoft.SharePoint.SPCheckinType]::MajorCheckIn)



Hope this will be helpful.

Check out Best Alternative to InfoPath -> Try Now

You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site

View all posts by Bijay Kumar →