Wednesday, 5 September 2012

Retrieve existing base permission using powershell

Below script can be used to retrieve the existing Base Permission for the given permission level.

[Parameter(Position=0, Mandatory=$true)]
$snapin = Get-PSSnapin
Where-Object { $_.Name -eq "Microsoft.SharePoint.Powershell" }
if ($snapin -eq $null) {
Add-PSSnapin "Microsoft.SharePoint.Powershell"

$site=Get-SPSite $siteURL
Write-Host $permissionLevel.BasePermissions

Query List/Document Library in Specific Folder

To query SharePoint List or Document Library in specific Folder “ FolderServerRelativeUrl ” as part of the CAML Query Code Snippet ...