Release Locked (checked out) Document in SharePoint

As a feature in SharePoint, you can check out any document item.

Sometime, the user who check out the document library is not available and the admin need to release (undo check-out) the document library.

We can use the following power shell script (Change the bold values)

$WebSiteURL="http://sps-dev/"
$DocLibName="DocLib"
$ItemID=5

$web=Get-SPWeb $WebSiteURL
$item=$web.Lists[$DocLibName].GetItemById($ItemID)
$userId=$item.file.LockedByUser.ID
$user = $web.AllUsers.GetByID($userId)

$impSite= New-Object Microsoft.SharePoint.SPSite($web.Url, $user.UserToken)
$impWeb = $impSite.OpenWeb()
$impList=$impWeb.Lists["Appraisal"]
$impitem=$impList.GetItemById($item.ID)
$impitem.file.ReleaseLock($impitem.File.LockId)

 

Change Project Server 2013(EPM) Security Mode

In Project Server 2013 (EPM 2013) there are two security modes:

  • SharePoint Mode (Default)
  • Project Server Mode

In Project Server Mode, there are more customization security groups and other functionality that is distinct from SharePoint groups.

to switch between those modes, user SharePoint 2013 PowerShell console and run the below commands:

  • SharePoint Mode
Set-SPPRojectPermissionMode -Url http://WebApplication/pwa -AdministratorAccount Domain\serviceAccountName -Mode SharePoint
  • Project Server Mode
Set-SPPRojectPermissionMode -Url http://WebApplication/pwa -AdministratorAccount Domain\serviceAccountName -Mode ProjectServer

after using Project server mode, the security will look like below image:

ProjectServerSecurity

References: