Get-ComPermission

Gets the COM Access or Launch and Activation permissions for the current computer.

Syntax

Get-ComPermission -Access -Limits [-Identity <String>] [<CommonParameters>]

Get-ComPermission -Access -Default [-Identity <String>] [<CommonParameters>]

Get-ComPermission -LaunchAndActivation -Limits [-Identity <String>] [<CommonParameters>]

Get-ComPermission -LaunchAndActivation -Default [-Identity <String>] [<CommonParameters>]

Description

COM access permissions ared used to "allow default access to application" or "set limits on applications that determine their own permissions". Launch and Activation permissions are used "who is allowed to launch applications or activate objects" and to "set limits on applications that determine their own permissions." Usually, these permissions are viewed and edited by opening dcomcnfg, right-clicking My Computer under Component Services > Computers, choosing Properties, going to the COM Security tab, and clicking Edit Default... or Edit Limits... buttons under the Access Permissions or Launch and Activation Permissions sections. This function does all that, but does it much easier, and returns objects you can work with.

These permissions are stored in the registry, under HKLM\Software\Microsoft\Ole. The default security registry value for Access Permissions is missing/empty until custom permissions are granted. If this is the case, this function will return objects that represent the default security, which was lovingly reverse engineered by gnomes.

Returns Carbon.Security.ComAccessRule objects, which inherit from `System.Security.AccessControl.AccessRule.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Access SwitchParameter

If set, returns permissions for COM Access permissions.

true false False
LaunchAndActivation SwitchParameter

If set, returns permissions for COM Access permissions.

true false False
Default SwitchParameter

Gets default security permissions.

true false False
Limits SwitchParameter

Gets security limit permissions.

true false False
Identity String

The identity whose access rule to return. If not set, all access rules are returned.

false false

Return Values

Carbon.Security.ComAccessRule.

EXAMPLE 1

Get-ComPermission -Access -Default

Gets the COM access default security permissions. Look how easy it is!

EXAMPLE 2

Get-ComPermission -LaunchAndActivation -Identity 'Administrators' -Limits

Gets the security limits for COM Launch and Activation permissions for the local administrators group.