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.