Grant-ComPermission

Grants COM access permissions.

Syntax

Grant-ComPermission -Identity <String> -Access -Limits -Deny [-Local] [-Remote] [-PassThru] [<CommonParameters>]
Grant-ComPermission -Identity <String> -Access -Default -Deny [-Local] [-Remote] [-PassThru] [<CommonParameters>]
Grant-ComPermission -Identity <String> -Access -Limits -Allow [-Local] [-Remote] [-PassThru] [<CommonParameters>]
Grant-ComPermission -Identity <String> -Access -Default -Allow [-Local] [-Remote] [-PassThru] [<CommonParameters>]
Grant-ComPermission -Identity <String> -LaunchAndActivation -Limits -Deny [-LocalLaunch] [-RemoteLaunch] [-LocalActivation] [-RemoteActivation] [-PassThru] [<CommonParameters>]
Grant-ComPermission -Identity <String> -LaunchAndActivation -Default -Deny [-LocalLaunch] [-RemoteLaunch] [-LocalActivation] [-RemoteActivation] [-PassThru] [<CommonParameters>]
Grant-ComPermission -Identity <String> -LaunchAndActivation -Limits -Allow [-LocalLaunch] [-RemoteLaunch] [-LocalActivation] [-RemoteActivation] [-PassThru] [<CommonParameters>]
Grant-ComPermission -Identity <String> -LaunchAndActivation -Default -Allow [-LocalLaunch] [-RemoteLaunch] [-LocalActivation] [-RemoteActivation] [-PassThru] [<CommonParameters>]

Description

Calling this function is equivalent to opening Component Services (dcomcnfg), right-clicking My Computer under Component Services > Computers, choosing Properties, going to the COM Security tab, and modifying the permission after clicking the Edit Limits... or Edit Default... buttons under the Access Permissions section.

You must set at least one of the LocalAccess or RemoteAccess switches.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Identity String true false
Access SwitchParameter

Grants Access Permissions.

true false False
LaunchAndActivation SwitchParameter

Grants Launch and Activation Permissions.

true false False
Default SwitchParameter

Grants default security permissions.

true false False
Limits SwitchParameter

Grants security limits permissions.

true false False
Allow SwitchParameter

If set, allows the given permissions.

true false False
Deny SwitchParameter

If set, denies the given permissions.

true false False
Local SwitchParameter

If set, grants local access permissions. Only valid if Access switch is set.

false false False
Remote SwitchParameter

If set, grants remote access permissions. Only valid if Access switch is set.

false false False
LocalLaunch SwitchParameter

If set, grants local launch permissions. Only valid if LaunchAndActivation switch is set.

false false False
RemoteLaunch SwitchParameter

If set, grants remote launch permissions. Only valid if LaunchAndActivation switch is set.

false false False
LocalActivation SwitchParameter

If set, grants local activation permissions. Only valid if LaunchAndActivation switch is set.

false false False
RemoteActivation SwitchParameter

If set, grants remote activation permissions. Only valid if LaunchAndActivation switch is set.

false false False
PassThru SwitchParameter

Return a Carbon.Security.ComAccessRights object for the permissions granted.

false false False

Return Values

Carbon.Security.ComAccessRule.

EXAMPLE 1

Grant-ComPermission -Access -Identity 'Users' -Allow -Default -Local

Updates access permission default security to allow the local Users group local access permissions.

EXAMPLE 2

Grant-ComPermission -LaunchAndActivation -Identity 'Users' -Limits -Deny -Local -Remote

Updates access permission security limits to deny the local Users group local and remote access permissions.