I am currently trying to read MSMQ information on a remote machine.
The main difficulty I experience is getting the name of the queue.
The names of the queues are pretty long, some more than 64 characters.
Using WMI the names always get truncated to 64 characters, which results for me in queuenames I can’t differentiate (similar prefix for first 64 characters).
I tried using .NET 3.5 SP1 and WMI Multi Query Tool and no differences.
Not only couldn’t I read the name, providing the suffix that would make the difference to the WMI query as WHERE didn’t help also.
Any hints how to make this work?
There is a very old entry in MS support DB which could be the explanation for this behavior. Although already there (2004) it is said that it might be fixed in VS 2005.
Either it has never been fixed, or maybe there something different wrong.
I do not think that you have a chance for getting the real long-length names using WMI.
John Breakwell has blogged about it: How long MSMQ queue names are displayed … or not