Friday, 29 March 2019

How to to resolve File Locked issue in SharePoint Online

SHARE
Error: The file "file" is locked for exclusive use by same User

Reason :
 “Windows SharePoint Services puts a write lock on the document on the server. The write lock times out after 10 minutes. Users cannot modify the document during the time when the document is locked”

Solution:

use these management shell commands to release lock.
$url = “http://gowthampnpdemo.com/demosite" 

$fileurl = “http:// gowthampnpdemo/pnpdemo/customlib/test.docx” 

$web = Get-SPWeb $url 

$item = $web.GetListItem($fileurl) 

$item.File.CheckOutStatus

$item.ReleaseLock
$web.Dispose()

SHARE

Author: verified_user

0 Comments: