< Back

Grant-CComPermission

Sun Jan 12, 2020 10:03 pm

NAME Grant-CComPermission



SYNOPSIS

Grants COM access permissions.





SYNTAX

Grant-CComPermission -Identity <String> -Access -Limits -Deny [-Local] [-Remote] [-PassThru] [<CommonParameters>]



Grant-CComPermission -Identity <String> -Access -Default -Deny [-Local] [-Remote] [-PassThru] [<CommonParameters>]



Grant-CComPermission -Identity <String> -Access -Limits -Allow [-Local] [-Remote] [-PassThru] [<CommonParameters>]



Grant-CComPermission -Identity <String> -Access -Default -Allow [-Local] [-Remote] [-PassThru] [<CommonParameters>]



Grant-CComPermission -Identity <String> -LaunchAndActivation -Limits -Deny [-LocalLaunch] [-RemoteLaunch]

[-LocalActivation] [-RemoteActivation] [-PassThru] [<CommonParameters>]



Grant-CComPermission -Identity <String> -LaunchAndActivation -Default -Deny [-LocalLaunch] [-RemoteLaunch]

[-LocalActivation] [-RemoteActivation] [-PassThru] [<CommonParameters>]



Grant-CComPermission -Identity <String> -LaunchAndActivation -Limits -Allow [-LocalLaunch] [-RemoteLaunch]

[-LocalActivation] [-RemoteActivation] [-PassThru] [<CommonParameters>]



Grant-CComPermission -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.





PARAMETERS

-Identity <String>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Access [<SwitchParameter>]

Grants Access Permissions.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-LaunchAndActivation [<SwitchParameter>]

Grants Launch and Activation Permissions.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Default [<SwitchParameter>]

Grants default security permissions.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Limits [<SwitchParameter>]

Grants security limits permissions.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Allow [<SwitchParameter>]

If set, allows the given permissions.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Deny [<SwitchParameter>]

If set, denies the given permissions.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Local [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Remote [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-LocalLaunch [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-RemoteLaunch [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-LocalActivation [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-RemoteActivation [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

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



Required? false

Position? named

Default value False

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:\\>Grant-CComPermission -Access -Identity 'Users' -Allow -Default -Local



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









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



PS C:\\>Grant-CComPermission -LaunchAndActivation -Identity 'Users' -Limits -Deny -Local -Remote



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











RELATED LINKS

Get-CComPermission

Revoke-CComPermission