I get the following error when I try to run:
Powershell ByPassLocks
Exception calling "BypassLocks" with 2 argument(s) attempting to perform an unauthorized operation.
I am just wondering how I can resolve this?
$recordsmanagement=[Microsoft.Office.RecordsManagement.RecordsRepository.Records]
$ChangeRecord = {
param( [Microsoft.SharePoint.SPListItem] $listItem)
$MMSField.SetFieldValue($listItem,$spTerm);
$listitem.SystemUpdate()
}
$sysuser = $web.AllUsers[$sysId]
$token = $sysuser.Token
$newSiteObject = New-Object Microsoft.SharePoint.SPSite($web.Url, $token)
$newWebObject = $newSiteObject.OpenWeb()
#$item = $newWebObject.GetListItem($fileurl)
#pass the delegate to the By Pass locks API
$recordsmanagement::bypasslocks($listItem, $ChangeRecord)
Any idea how this can be resolved?
faye fouladi