是否可以从bat文件中清除msmq队列?
基本上我想制作一个bat文件或者至少是快速简单的东西,以便未经培训的员工可以在不知道任何shell或管理工具的情况下点击并修复
有人可以帮我正确的方向吗?
GSe*_*rjo 13
通过实用程序管理的任务包括以下内容:
不要忘记PowerShell,看看PowerShell社区扩展
更新
打开powershell并逐行写入
[Reflection.Assembly]::LoadWithPartialName("System.Messaging")
$queueName = '.\Private$\testQueue'
$queue = new-object -TypeName System.Messaging.MessageQueue -ArgumentList $queueName
$queue.Purge()
Run Code Online (Sandbox Code Playgroud)
从cmd调用powershell
从cmd调用脚本的最简单方法.
powershell.exe -executionpolicy Unrestricted C:\ purgemsmq.ps1