2
votes

Does anybody know how to read the user\group access permissions from an MSMQ private queue in powershell? I'd like to do this as a sanity check for my deployment script that installs NServiceBus services to make sure the service user actually has read access to the appropriate queue before installing the service.

From the documentation on the System.Messaging.MessageQueue class it seems like there are plenty of methods to set permissions for a queue, but no methods to get the permissions.

Any help is greatly appreciated!

-Jake

1

1 Answers

1
votes

There is no .net method to retrieve actual ACL on a msmqueue.

You need to do some P/invoke::MQGetQueueSecurity

Here c# code to add-type in powershell::pinvoke.net