< Back

ConvertTo-CContainerInheritanceFlags

Sun Jan 12, 2020 9:05 pm

NAME ConvertTo-CContainerInheritanceFlags



SYNOPSIS

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

enumeration value.





SYNTAX

ConvertTo-CContainerInheritanceFlags [-InheritanceFlags] {None | ContainerInherit | ObjectInherit}

[-PropagationFlags] {None | NoPropagateInherit | InheritOnly} [<CommonParameters>]





DESCRIPTION

`Grant-CPermission`, `Test-CPermission`, and `Get-CPermission` 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-CPermission`.





PARAMETERS

-InheritanceFlags

The inheritance flags to convert.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PropagationFlags

The propagation flags to convert.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Carbon.Security.ContainerInheritanceFlags.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>ConvertTo-CContainerInheritanceFlags -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.











RELATED LINKS

Grant-CPermission

Test-CPermission