Set-MsmqQueueACL - Allow - can't use list as per docs? Set-MsmqQueueACL - Allow - can't use list as per docs? powershell powershell

Set-MsmqQueueACL - Allow - can't use list as per docs?


The docs are likely missing quotes; it's expecting an enum that supports bitfields, so most likely you'd do it like this (I don't have the msmq cmdlets or types on my 2016 PS 5.1 boxes so I can't test), using bitwise or:

$allows = [Microsoft.Msmq.PowerShell.Commands.MessageQueueAccessRights]::Peek -bor          [Microsoft.Msmq.PowerShell.Commands.MessageQueueAccessRights]::Send -bor          [Microsoft.Msmq.PowerShell.Commands.MessageQueueAccessRights]::ReceiveSet-MsmqQueueAcl -UserName "REDMOND\madmax" -Allow $allows

It should work by putting all the values in quotes (that is, not an array, a string with commas in it), but you said you tried it that way and it didn't work; did that produce a different error?