< Back
Grant-CMsmqMessageQueuePermission
Post
NAME Grant-CMsmqMessageQueuePermission
SYNOPSIS
Grants a user permissions on an MSMQ message queue.
SYNTAX
Grant-CMsmqMessageQueuePermission [-Name] <String> [-Private] [-Username] <String> [-AccessRights] {DeleteMessage
| PeekMessage | ReceiveMessage | WriteMessage | DeleteJournalMessage | ReceiveJournalMessage | SetQueueProperties
| GetQueueProperties | DeleteQueue | GetQueuePermissions | GenericWrite | GenericRead | ChangeQueuePermissions |
TakeQueueOwnership | FullControl} [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
If you want users to be able to access your queue, you need to grant them access. This function will do that.
The rights you can assign are specified using values from the [MessageQueueAccessRights
enumeration](http://msdn.microsoft.com/en-us/library ... ights.aspx).
If your queue is private, make sure you set the `Private` switch.
PARAMETERS
-Name <String>
The queue name.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Private [<SwitchParameter>]
Is the queue private?
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Username <String>
The user to grant permissions to.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AccessRights
The rights to grant the user.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
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
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Grant-CMsmqMessageQueuePermission -Name MovieQueue -Username REGAL\\Employees -AccessRights FullControl
Grants Regal Cinema employees full control over the MovieQueue.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Grant-CMsmqMessageQueuePermission -Name MovieQueue -Private -Username REGAL\\Critics -AccessRights
WriteMessage
Grants all of Regal's approved movie critics permission to write to the private critic's `MovieQueue`. Lucky!
RELATED LINKS
http://msdn.microsoft.com/en-us/library ... ights.aspx
SYNOPSIS
Grants a user permissions on an MSMQ message queue.
SYNTAX
Grant-CMsmqMessageQueuePermission [-Name] <String> [-Private] [-Username] <String> [-AccessRights] {DeleteMessage
| PeekMessage | ReceiveMessage | WriteMessage | DeleteJournalMessage | ReceiveJournalMessage | SetQueueProperties
| GetQueueProperties | DeleteQueue | GetQueuePermissions | GenericWrite | GenericRead | ChangeQueuePermissions |
TakeQueueOwnership | FullControl} [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
If you want users to be able to access your queue, you need to grant them access. This function will do that.
The rights you can assign are specified using values from the [MessageQueueAccessRights
enumeration](http://msdn.microsoft.com/en-us/library ... ights.aspx).
If your queue is private, make sure you set the `Private` switch.
PARAMETERS
-Name <String>
The queue name.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Private [<SwitchParameter>]
Is the queue private?
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Username <String>
The user to grant permissions to.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AccessRights
The rights to grant the user.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
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
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Grant-CMsmqMessageQueuePermission -Name MovieQueue -Username REGAL\\Employees -AccessRights FullControl
Grants Regal Cinema employees full control over the MovieQueue.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Grant-CMsmqMessageQueuePermission -Name MovieQueue -Private -Username REGAL\\Critics -AccessRights
WriteMessage
Grants all of Regal's approved movie critics permission to write to the private critic's `MovieQueue`. Lucky!
RELATED LINKS
http://msdn.microsoft.com/en-us/library ... ights.aspx