繁体   English   中英

Powershell Windows Server 2008 R2 SP1中未将术语“ Get-MsmqQueue”识别为cmdlet的名称

[英]Powershell The term 'Get-MsmqQueue' is not recognized as the name of a cmdlet in Windows Server 2008 R2 SP1

我正在尝试在Windows Server 2008 R2 SP1(x64)中使用命令Get-MsmqQueue,但是出现以下错误:

Get-MsmqQueue : The term 'Get-MsmqQueue' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-MsmqQueue
+ ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-MsmqQueue:String) [], Comma
   ndNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

MSMQ已安装在计算机上,Powershell版本是5,我已经重新安装了MSMQ,什么也没有。

我该如何解决?

安装PowerShell版本5后,它将不包含任何新cmdlet。 这样做的原因是,这些cmdlet与操作系统可用的API绑定在一起,而2008 R2没有所需的API。 您将无法使用cmdlet,因为该cmdlet最初在服务器2012中可用。

您可以通过使用WMI提取MSMQ数据来解决此问题,但是我不知道具体操作方法。 这个答案在这里展示了一个例子。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM