March 2014 Entries

Powershell MSMQ

I had to write a function to send MSMQ messages using powershell. Here is the code that builds on an earlier post sending Unicode text messages with MSMQ[Reflection.Assembly]::... SendMSMQ{param($queueName,$... $messageBody = $messageBody.replace("\<... "").Trim()if($messageBody.l... -gt 0){ $queue = new-object System.Messaging.MessageQue... $msg = new-object System.Messaging.Message $msg.Label = $messageLabel ......