Below script can be used to retrieve the existing Base Permission for the given permission level.
param(
[Parameter(Position=0, Mandatory=$true)]
[string]
$siteURL
)
$snapin = Get-PSSnapin
Where-Object { $_.Name -eq "Microsoft.SharePoint.Powershell" }
if ($snapin -eq $null) {
Add-PSSnapin "Microsoft.SharePoint.Powershell"
}
$site=Get-SPSite $siteURL
$web=$site.RootWeb
$permissionLevel=$web.RoleDefinitions["PermissionName"]
Write-Host $permissionLevel.BasePermissions
$web.Dispose()
$site.Dispose()
param(
[Parameter(Position=0, Mandatory=$true)]
[string]
$siteURL
)
$snapin = Get-PSSnapin
Where-Object { $_.Name -eq "Microsoft.SharePoint.Powershell" }
if ($snapin -eq $null) {
Add-PSSnapin "Microsoft.SharePoint.Powershell"
}
$site=Get-SPSite $siteURL
$web=$site.RootWeb
$permissionLevel=$web.RoleDefinitions["PermissionName"]
Write-Host $permissionLevel.BasePermissions
$web.Dispose()
$site.Dispose()
No comments:
Post a Comment