Powershell术语';获取MsmqQueue';未被识别为Windows Server 2008 R2 SP1中cmdlet的名称
我试图在Windows Server 2008 R2 SP1(x64)中使用命令Get-MsmqQueue,但出现以下错误:Powershell术语';获取MsmqQueue';未被识别为Windows Server 2008 R2 SP1中cmdlet的名称,windows,powershell,msmq,Windows,Powershell,Msmq,我试图在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,
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,因为它在server 2012中首次可用 您可以通过使用WMI来提取MSMQ数据来解决此问题,但我不知道如何具体操作。这个答案给出了一个例子