0

I've searched many places and cannot find a way to modify permissions on an MSMQueue that is already existing.

Typically permissions are set during the creation of the queue. It did not happen in this case. Deleting the queue and reinstalling is not an option.

I would greatly appreciate any help with updating permissions on an existing queue.

I know I can do this:

[Reflection.Assembly]::LoadWithPartialName("System.Messaging") | Out-Null
$msmq = [System.Messaging.MessageQueue]
$q = $msmq::Create($qName,$true)
$q.SetPermissions($Access,[System.Messaging.MessageQueueAccessRights]::ReceiveMessage, [System.Messaging.AccessControlEntryType]::Set)

and I know I can delete the queue, but again, in this instance it's not an option. What I need is another way to grasp the MSMQ to set $q then I should be able to SetPermissions. I just can't figure our what $msmq::{SOMETHING THAT I NEED}($qName).

Please note that I cannot use the MSMQ cmdlets available in later versions of powershell.

freakostudent
  • 105
  • 1
  • 2
  • 9
  • Have you looked at [this answer](https://stackoverflow.com/questions/765954/setting-permissions-on-a-msmq-queue-in-a-script) ? – jrider Oct 25 '18 at 17:43
  • Thank you for your response and Yes. In that example they delete the queue and add it back to set the permissions. I can’t do that – freakostudent Oct 25 '18 at 21:03
  • I was referring to: `Get-MsmqQueue -Name "MyQueue" -QueueType Private | Set-MsmqQueueAcl -UserName "Everyone" -Allow FullControl` – jrider Oct 25 '18 at 21:21
  • I can’t use the cmdlets in this version of PowerShell – freakostudent Oct 26 '18 at 09:35

0 Answers0