簡體   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