Search code examples
powershellvbscriptpermissionsmsmq

Setting permissions on a MSMQ queue in a script


Can anyone give me some pointers on how to set permissions on MSMQ queues in script, preferably PowerShell, but I'd use VBscript


Solution

  • A present (2015) day answer to this question.

    Example:

    New-MsmqQueue -Name "MyQueue" -QueueType Private
    Get-MsmqQueue -Name "MyQueue" -QueueType Private | 
      Set-MsmqQueueAcl -UserName "Everyone" -Allow FullControl
    

    Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

    Reference: https://technet.microsoft.com/en-us/library/dn391735(v=wps.630).aspx