【发布时间】:2012-08-26 08:56:18
【问题描述】:
我目前正在尝试编写一个脚本,该脚本将通过消息队列并在正文中存在某个字符串时删除/发送每条消息到另一个子队列。
在我目前正在尝试实现的伪代码中
$queue = 'My Queue'
foreach($message in $queue)
{
if ($message.body.Contains("matchstring")
{
$message.delete OR $message.movequeue
}
}
我目前在 powershell 中使用 [Reflection.Assembly]::LoadWithPartialName("System.Messaging") 但我不确定它是否包含我需要的所有功能。
【问题讨论】:
标签: powershell msmq