ConvertTo-ContainerInheritanceFlags

Converts a combination of InheritanceFlags Propagation Flags into a Carbon.Security.ContainerInheritanceFlags enumeration value.

Syntax

ConvertTo-ContainerInheritanceFlags [-InheritanceFlags] {None | ContainerInherit | ObjectInherit} [-PropagationFlags] {None | NoPropagateInherit | InheritOnly} [<CommonParameters>]

Description

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.

Related Commands

Parameters

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

Return Values

Carbon.Security.ContainerInheritanceFlags.

EXAMPLE 1

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.