Posts

Showing posts from November, 2017

Unlocked -Checked-In files in sharepoint

Image
Good article: https://www.codeproject.com/Articles/93965/Force-SharePoint-Document-Unlocked-Checked-In OR Using POWERSHELL You can unlock it programmatically! There is no UI to unlock the locked files - as we do have for Check-in Checked-out files. So, Here is my solution to unlock the locked files using PowerShell. Add - PSSnapin microsoft . sharepoint . powershell - ErrorAction SilentlyContinue #Variables for Web and File URLs $WebURL = "http://intranet.crescent.com/support/" $FileURL = "http://intranet.crescent.com/support/T1Support/Reports/ServiceTickets.xlsx" #Get Web and File Objects $web = Get - SPWeb $WebURL $File = $web . GetFile ( $FileURL ) #Check if File is locked if ( $File . LockId - ne $null ) { Write - host "File is Loked out by:" $File . LockedByUser . LoginName Write - host "File Lock Type: " $file . LockType Write - host "File Locked On: " $file . LockedDate Wr