
You should receive the output from the server when it completes so you should be able to diagnose any errors. You will need to open each file in turn with a text editor to determine which queue it relates to.

Find the config file in this folder that describes a queue that has 'good' security permissions. All of the UCs contribute to posting messages to the queue, so its not about just inspecting one UC, but its the sum of all UCs that creates this problem.

This assumes you've gotten powershell remoting enabled on the target server. And for a manual process if all else fails: Stop the MSMQ Service (Services -> Message Queuing) Open the C:WINDOWSsystem32msmqstoragelqs folder. (Obviously, the thread must be running a message loop.) The WMCOPYDATA message is explicitly designed for this purpose.
#WINDOWS MESSAGE QUEUE HOW TO#
Then I used invoke-command to run the script on the remote server: Invoke-Command -ComputerName remoteserver -FilePath. Windows and Messages Using Messages and Message Queues Article 6 contributors Feedback In this article Creating a Message Loop Examining a Message Queue Posting a Message Sending a Message The following code examples demonstrate how to perform the following tasks associated with Windows messages and message queues. Call the PostMessage function to add a message to the queue for a window, or PostThreadMessage to add a message to the queue for a thread. I saved your script to a file (create-queue.ps1) modified slightly to set $queueName = '.\private$\testqueue'.

Yes it appears remote queue creation via the System.Messaging API is not supported, but all is not lost! Use powershell remoting (as has suggested) to create a local queue and it works just fine.
