Advertisement

Responsive Advertisement

How to to resolve File Locked issue in SharePoint Online

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()

Post a Comment

0 Comments