Cmdlet visible in multiple roles

In cases where a cmdlet is visible in multiple roles, different things happen. If each role allows different parameters and one role does not impose any parameter constraints, the cmdlet is made visible without any constraints at all:

$capA = @{VisibleCmdlets = 'Get-Process'; Parameters = @{Name = 'Name'}}
$capB = @{VisibleCmdlets = 'Get-Process'}
$merge = @{VisibleCmdlets = 'Get-Process'}

If all roles apply parameter constraints, the constraints will be merged:

$capA = @{VisibleCmdlets = 'Get-Process'; Parameters = @{Name = 'Name'}}
$capB = @{VisibleCmdlets = 'Get-Process'; Parameters = @{Name = 'Id'}}
$merge = @{VisibleCmdlets = 'Get-Process'; Parameters = @{Name = 'Name'},@{Name = 'Id'}}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.254.35