Created
February 9, 2018 09:03
-
-
Save fabianneve/87ca9599049bf27bb66b24596ebd967a to your computer and use it in GitHub Desktop.
Clear short term file lock of a file in a SharePoint 2013+ document library. Replace url, list (List Title) and item ID.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$web = get-spweb "https://domain/sitecollection/site" | |
$list = $web.Lists["Documents"] | |
$item = $list.Items.GetItemById(123) | |
$item.File.ReleaseLock($item.File.LockId) | |
$web.Dispose() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment