This was an issue reported by one of our user. Not sure what he did, but MSMQ is showing “Access Denied” and the properties box is gone. There is no way to delete it from GUI.
There are some articles online that suggest creating a dummy private queue and then copying the Security permission from the c:\windows\system32\storage\Lqs folder. In our case, it did not work. After changing the security permission and restarting the MSMQ service, it got worse. Now the system does not recognize the queue at all. I tried changing the security permission back, but it stayed this way.
I compared a healthy MSMQ private queue by running the Get-MsmqQueue PowerShell Cmdlet and saw that this queue is missing a lot of information.
$QueueName = "#put the name of your queue here" Get-MsmqQueue -name $QueueName
When I try to get the ACL properties of the Queue, I was getting the same error that this queue does not exist.
When I tried the same cmdlet on a healthy queue, I should be seeing this instead.
I tried to delete it using PowerShell, but it was still giving me an error that this queue does not exist, and thus cannot be deleted.
$QueueName = "#put the name of your queue here" Get-MsmqQueue -name $QueueName | Remove-MsmqQueue -Force
At the end, I stop the MSMQ service, then go back to C:\windows\system32\MSMQ\Storage\Lqs folder and rename the file that has all the properties/metadata of this private queue. Once I started MSMQ service again, the queue was gone from MSMQ
After that, the user can reuse the same name for the Queue and create it again. If they do not need to use the same name, they can just recreate the queue with a different name in the beginning and it will still work for them.