Skip to content

Commit

Permalink
Merge pull request MicrosoftDocs#2209 from velkovb/fix/1950-example-a…
Browse files Browse the repository at this point in the history
…nd-rights

Resolves MicrosoftDocs#1950
  • Loading branch information
American-Dipper authored Nov 18, 2020
2 parents c45b9c6 + 2d7b79e commit 8b8b168
Show file tree
Hide file tree
Showing 3 changed files with 164 additions and 194 deletions.
133 changes: 55 additions & 78 deletions docset/windows/msmq/Set-MsmqQueueACL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,44 +39,37 @@ The cmdlet modifies private, public, journal, system journal, system dead-letter
## EXAMPLES

### Example 1: Modify the ACLs of queues specified by name
```
PS C:\> Get-MsmqQueue -Name "Order*" -QueueType Private | Set-MsmqQueueAcl -UserName "CONTOSO\DavidChew" -Allow Delete,Peek,Receive,Send -Deny TakeOwnership
```powershell
PS C:\> $queue = Get-MsmqQueue -Name "Order*" -QueueType Private
PS C:\> $rights = "DeleteQueue", "PeekMessage", "ReceiveMessage", "WriteMessage"
PS C:\> $rights | Foreach-Object { Set-MsmqQueueAcl -InputObject $queue -UserName "CONTOSO\DavidChew" -Allow $PSItem}
PS C:\> Set-MsmqQueueAcl -InputObject $queue -UserName "CONTOSO\DavidChew" -Deny TakeQueueOwnership
```

This command gets all the private queues that have names that start with the string Order by using the **Get-MsmqQueue** cmdlet.
The command passes the results to the current cmdlet by using the pipeline operator.
The current cmdlet modifies the ACL of the queues.
This command gets all the private queues that have names that start with the string Order by using the **Get-MsmqQueue** cmdlet. The current cmdlet modifies the ACL of the queues.

## PARAMETERS

### -Allow
Specifies an array of permissions that this cmdlet grants to a 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 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.
- DeleteQueue - Delete the specified queue
- FullControl - Full control of the specified queue
- GetQueuePermissions - Get the permissions of the specified queue
- GetQueueProperties - Get the properties of the specified queue
- ReceiveJournalMessage - Receive messages from the journal queue. This includes the rights to delete and peek messages from the journal queue
- DeleteJournalMessage - Delete messages from the journal queue
- PeekMessage - Peek a message from the specified queue
- ReceiveMessage - Receive messages from the queue. This includes the rights to delete and peek messages
- WriteMessage - Send a message to the specified queue
- DeleteMessage - Delete a message from the specified queue
- ChangeQueuePermissions - Set the permissions of the specified queue
- SetQueueProperties - Set the properties of the specified queue
- TakeQueueOwnership - Assign the specified queue to oneself
- GenericRead - A combination of `GetQueueProperties`, `GetQueuePermissions`, `ReceiveMessage`, and `ReceiveJournalMessage`
- GenericWrite - A combination of `GetQueueProperties`, `GetQueuePermissions`, and `WriteMessage`

```yaml
Type: MessageQueueAccessRights
Expand Down Expand Up @@ -108,32 +101,24 @@ Accept wildcard characters: False
### -Deny
Specifies an array of permissions that the cmdlet revokes from a 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 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.
- DeleteQueue - Delete the specified queue
- FullControl - Full control of the specified queue
- GetQueuePermissions - Get the permissions of the specified queue
- GetQueueProperties - Get the properties of the specified queue
- ReceiveJournalMessage - Receive messages from the journal queue. This includes the rights to delete and peek messages from the journal queue
- DeleteJournalMessage - Delete messages from the journal queue
- PeekMessage - Peek a message from the specified queue
- ReceiveMessage - Receive messages from the queue. This includes the rights to delete and peek messages
- WriteMessage - Send a message to the specified queue
- DeleteMessage - Delete a message from the specified queue
- ChangeQueuePermissions - Set the permissions of the specified queue
- SetQueueProperties - Set the properties of the specified queue
- TakeQueueOwnership - Assign the specified queue to oneself
- GenericRead - A combination of `GetQueueProperties`, `GetQueuePermissions`, `ReceiveMessage`, and `ReceiveJournalMessage`
- GenericWrite - A combination of `GetQueueProperties`, `GetQueuePermissions`, and `WriteMessage`

```yaml
Type: MessageQueueAccessRights
Expand Down Expand Up @@ -167,32 +152,24 @@ Accept wildcard characters: False

### -Remove
Specifies an array of permissions that this cmdlet removes from a 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 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.
- DeleteQueue - Delete the specified queue
- FullControl - Full control of the specified queue
- GetQueuePermissions - Get the permissions of the specified queue
- GetQueueProperties - Get the properties of the specified queue
- ReceiveJournalMessage - Receive messages from the journal queue. This includes the rights to delete and peek messages from the journal queue
- DeleteJournalMessage - Delete messages from the journal queue
- PeekMessage - Peek a message from the specified queue
- ReceiveMessage - Receive messages from the queue. This includes the rights to delete and peek messages
- WriteMessage - Send a message to the specified queue
- DeleteMessage - Delete a message from the specified queue
- ChangeQueuePermissions - Set the permissions of the specified queue
- SetQueueProperties - Set the properties of the specified queue
- TakeQueueOwnership - Assign the specified queue to oneself
- GenericRead - A combination of `GetQueueProperties`, `GetQueuePermissions`, `ReceiveMessage`, and `ReceiveJournalMessage`
- GenericWrite - A combination of `GetQueueProperties`, `GetQueuePermissions`, and `WriteMessage`

```yaml
Type: MessageQueueAccessRights
Expand Down Expand Up @@ -239,7 +216,7 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
92 changes: 52 additions & 40 deletions docset/winserver2012-ps/msmq/Set-MsmqQueueACL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ This cmdlet can be applied to private, public, journal, system journal, system d

## EXAMPLES

### Example 1: Set the access rights for the specified queue
```
PS C:\>Get-MsmqQueue -Name "Order*" -QueueType Private | Set-MsmqQueueAcl -UserName "REDMOND\pattiful" -Allow Delete,Peek,Receive,Send -Deny TakeOwnership
### Example 1: Modify the ACLs of queues specified by name
```powershell
PS C:\> $queue = Get-MsmqQueue -Name "Order*" -QueueType Private
PS C:\> $rights = "DeleteQueue", "PeekMessage", "ReceiveMessage", "WriteMessage"
PS C:\> $rights | Foreach-Object { Set-MsmqQueueAcl -InputObject $queue -UserName "CONTOSO\DavidChew" -Allow $PSItem}
PS C:\> Set-MsmqQueueAcl -InputObject $queue -UserName "CONTOSO\DavidChew" -Deny TakeQueueOwnership
```

This command sets Allow, Delete, Peek, Receive, and Send access rights for user pattiful on all queues that have the wildcard named Order*.
This command gets all the private queues that have names that start with the string Order by using the **Get-MsmqQueue** cmdlet. The current cmdlet modifies the ACL of the queues.

## PARAMETERS

Expand All @@ -43,18 +46,21 @@ 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.
- DeleteQueue - Delete the specified queue
- FullControl - Full control of the specified queue
- GetQueuePermissions - Get the permissions of the specified queue
- GetQueueProperties - Get the properties of the specified queue
- ReceiveJournalMessage - Receive messages from the journal queue. This includes the rights to delete and peek messages from the journal queue
- DeleteJournalMessage - Delete messages from the journal queue
- PeekMessage - Peek a message from the specified queue
- ReceiveMessage - Receive messages from the queue. This includes the rights to delete and peek messages
- WriteMessage - Send a message to the specified queue
- DeleteMessage - Delete a message from the specified queue
- ChangeQueuePermissions - Set the permissions of the specified queue
- SetQueueProperties - Set the properties of the specified queue
- TakeQueueOwnership - Assign the specified queue to oneself
- GenericRead - A combination of `GetQueueProperties`, `GetQueuePermissions`, `ReceiveMessage`, and `ReceiveJournalMessage`
- GenericWrite - A combination of `GetQueueProperties`, `GetQueuePermissions`, and `WriteMessage`

```yaml
Type: MessageQueueAccessRights
Expand All @@ -73,18 +79,21 @@ Specifies the permissions that are revoked from the supplied user account or gro
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.
- DeleteQueue - Delete the specified queue
- FullControl - Full control of the specified queue
- GetQueuePermissions - Get the permissions of the specified queue
- GetQueueProperties - Get the properties of the specified queue
- ReceiveJournalMessage - Receive messages from the journal queue. This includes the rights to delete and peek messages from the journal queue
- DeleteJournalMessage - Delete messages from the journal queue
- PeekMessage - Peek a message from the specified queue
- ReceiveMessage - Receive messages from the queue. This includes the rights to delete and peek messages
- WriteMessage - Send a message to the specified queue
- DeleteMessage - Delete a message from the specified queue
- ChangeQueuePermissions - Set the permissions of the specified queue
- SetQueueProperties - Set the properties of the specified queue
- TakeQueueOwnership - Assign the specified queue to oneself
- GenericRead - A combination of `GetQueueProperties`, `GetQueuePermissions`, `ReceiveMessage`, and `ReceiveJournalMessage`
- GenericWrite - A combination of `GetQueueProperties`, `GetQueuePermissions`, and `WriteMessage`

```yaml
Type: MessageQueueAccessRights
Expand Down Expand Up @@ -119,18 +128,21 @@ Specifies the permissions that are removed from the supplied user account or gro

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.
- DeleteQueue - Delete the specified queue
- FullControl - Full control of the specified queue
- GetQueuePermissions - Get the permissions of the specified queue
- GetQueueProperties - Get the properties of the specified queue
- ReceiveJournalMessage - Receive messages from the journal queue. This includes the rights to delete and peek messages from the journal queue
- DeleteJournalMessage - Delete messages from the journal queue
- PeekMessage - Peek a message from the specified queue
- ReceiveMessage - Receive messages from the queue. This includes the rights to delete and peek messages
- WriteMessage - Send a message to the specified queue
- DeleteMessage - Delete a message from the specified queue
- ChangeQueuePermissions - Set the permissions of the specified queue
- SetQueueProperties - Set the properties of the specified queue
- TakeQueueOwnership - Assign the specified queue to oneself
- GenericRead - A combination of `GetQueueProperties`, `GetQueuePermissions`, `ReceiveMessage`, and `ReceiveJournalMessage`
- GenericWrite - A combination of `GetQueueProperties`, `GetQueuePermissions`, and `WriteMessage`

```yaml
Type: MessageQueueAccessRights
Expand Down
Loading

0 comments on commit 8b8b168

Please sign in to comment.