Public/Get-ViewGroupPermission.ps1
function Get-ViewGroupPermission { <# .SYNOPSIS Short description .DESCRIPTION Long description .EXAMPLE PS C:\> <example usage> Explanation of what the example does .INPUTS Inputs (if any) .OUTPUTS Output (if any) .NOTES General notes #> [CmdletBinding()] [OutputType([VideoOS.Management.VmoClient.PublicViewGroupPermissionSet])] param ( # Specifies the View Group from which to retrieve an effective set of permissions [Parameter(Mandatory, ValueFromPipeline)] [ValidateNotNull()] [VideoOS.Management.VmoClient.PublicViewGroup] $ViewGroup, # Specifies the name of the role for which the effective set of permissions should be retrieved [Parameter(Mandatory)] [string] [ValidateNotNullOrEmpty()] $RoleName ) process { $permissionSet = $ViewGroup.EffectivePermissions("[VideoOS]\$($RoleName)") [string[]]$permissionList = $permissionSet | Get-Member -MemberType Property | Select-Object -ExpandProperty Name | Where-Object { $permissionSet.$_ } Write-Output $permissionList } } |