Converts a combination of InheritanceFlags Propagation Flags into a Carbon.Security.ContainerInheritanceFlags enumeration value.
ConvertTo-ContainerInheritanceFlags [-InheritanceFlags] {None | ContainerInherit | ObjectInherit} [-PropagationFlags] {None | NoPropagateInherit | InheritOnly} [<CommonParameters>]
Grant-Permission
, Test-Permission
, and Get-Permission
all take an ApplyTo
parameter, which is a Carbon.Security.ContainerInheritanceFlags
enumeration value. This enumeration is then converted to the appropriate System.Security.AccessControl.InheritanceFlags
and System.Security.AccessControl.PropagationFlags
values for getting/granting/testing permissions. If you prefer to speak in terms of InheritanceFlags
and PropagationFlags
, use this function to convert them to a ContainerInheritanceFlags
value.
If your combination doesn't result in a valid combination, $null
is returned.
For detailed description of inheritance and propagation flags, see the help for Grant-Permission
.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
InheritanceFlags | InheritanceFlags | The inheritance flags to convert. |
true | false | |
PropagationFlags | PropagationFlags | The propagation flags to convert. |
true | false |
Carbon.Security.ContainerInheritanceFlags.
ConvertTo-ContainerInheritanceFlags -InheritanceFlags 'ContainerInherit' -PropagationFlags 'None'
Demonstrates how to convert InheritanceFlags
and PropagationFlags
enumeration values into a ContainerInheritanceFlags
. In this case, [Carbon.Security.ContainerInheritanceFlags]::ContainerAndSubContainers
is returned.