Set-MsmqQueueACL
Set-MsmqQueueACL
Modifies access rights to queues.
Syntax
Parameter Set: Default
Set-MsmqQueueACL [-InputObject] <MessageQueue[]> -UserName <String[]> [-Allow <MessageQueueAccessRights> ] [-Deny <MessageQueueAccessRights> ] [-Remove <MessageQueueAccessRights> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
This cmdlet modifies the access rights of the specified queues. It returns the updated MsmqQueueAcl object. The cmdlet can be applied to private, public, journal, system journal, system dead-letter, and system transactional dead-letter queues.
Parameters
-Allow<MessageQueueAccessRights>
Specifies the permissions that are granted to the supplied user account or group.
The acceptable values for this parameter are:
Delete: Delete the specified queue.
FullControl: Full control of the specified queue.
GetPermissions: Get the permissions of the specified queue.
GetProperties: Get the properties of the specified queue.
JournalReceive: Receive a message from the specified queue’s journal queue.
Peek: Peek a message from the specified queue.
Receive: Receive a message from the specified queue.
Send: send a message to the specified queue.
SetPermissions: Set the permissions of the specified queue.
SetProperties: Set the properties of the specified queue.
SpecialPermissions: Special permissions for the specified queue.
TakeOwnership: Assign the specified queue to oneself.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Deny<MessageQueueAccessRights>
Specifies the permissions that are revoked from the supplied user account or group.
The acceptable values for this parameter are:
Delete: Delete the specified queue.
FullControl: Full control of the specified queue.
GetPermissions: Get the permissions of the specified queue.
GetProperties: Get the properties of the specified queue.
JournalReceive: Receive a message from the specified queue’s journal queue.
Peek: Peek a message from the specified queue.
Receive: Receive a message from the specified queue.
Send: send a message to the specified queue.
SetPermissions: Set the permissions of the specified queue.
SetProperties: Set the properties of the specified queue.
SpecialPermissions: Special permissions for the specified queue.
TakeOwnership: Assign the specified queue to oneself.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-InputObject<MessageQueue[]>
An array of MsmqQueue objects that represent the queues for which permissions are updated. Accepts pipelined input.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true(ByValue) |
Accept Wildcard Characters? |
false |
-Remove<MessageQueueAccessRights>
Specifies the permissions that are removed from the supplied user account or group.
The acceptable values for this parameter are:
Delete: Delete the specified queue.
FullControl: Full control of the specified queue.
GetPermissions: Get the permissions of the specified queue.
GetProperties: Get the properties of the specified queue.
JournalReceive: Receive a message from the specified queue’s journal queue.
Peek: Peek a message from the specified queue.
Receive: Receive a message from the specified queue.
Send: send a message to the specified queue.
SetPermissions: Set the permissions of the specified queue.
SetProperties: Set the properties of the specified queue.
SpecialPermissions: Special permissions for the specified queue.
TakeOwnership: Assign the specified queue to oneself.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-UserName<String[]>
Specifies the user account or group whose permissions are changed.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
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, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Usage Example
PS C:\> Get-MsmqQueue –Name Order* –QueueType Private | Set-MsmqQueueAcl –UserName "REDMOND\pattiful" –Allow Delete,Peek,Receive,Send –Deny TakeOwnership