< Back

Get-CComPermission

Sun Jan 12, 2020 9:35 pm

NAME Get-CComPermission



SYNOPSIS

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





SYNTAX

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



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



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



Get-CComPermission -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](htt

p://msdn.microsoft.com/en-us/library/system.security.accesscontrol.accessrule.aspx).





PARAMETERS

-Access [<SwitchParameter>]

If set, returns permissions for COM Access permissions.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-LaunchAndActivation [<SwitchParameter>]

If set, returns permissions for COM Access permissions.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Default [<SwitchParameter>]

Gets default security permissions.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Limits [<SwitchParameter>]

Gets security limit permissions.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Identity <String>

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



Required? false

Position? named

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.ComAccessRule.





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



PS C:\\>Get-CComPermission -Access -Default



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









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-CComPermission -LaunchAndActivation -Identity 'Administrators' -Limits



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











RELATED LINKS

Grant-CComPermission

Revoke-CComPermission