0

When using:

$web = get-spweb "http://myfarm/mysite/mysubsite"
$list = $web.Lists["My Library"]
$item = $list.Items.GetItemById(**123**)
$item.File.ReleaseLock($item.File.LockId)
$web.Dispose()

How do i find out Item Id? I assume it's not the documentId. Item path is Library/Folder/DocumentSet/document.xlsx

0

You can directly get a file using serverRelativeUrl in PowerShell.

$web = get-spweb "http://myfarm/mysite/mysubsite"
$file = $web.GetFile("FileUrl")
$file.ReleaseLock($file.LockId)
$web.Dispose()

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.