Issue with MSMQ PowerShell module in PS7

Kumar Krishnamoorthy 1 Reputation point
2022-12-16T11:42:18.883+00:00

Please refer to the issue created in PowerShell github repo https://github.com/PowerShell/PowerShell/issues/18783

While using MSMQ module command in PowerShell 7, we cannot pipe the output of Get-MsmqQueue to Remove-MsmqQueue, as it causes error.

The same command works fine in PowerShell 5.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,628 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,666 Reputation points
    2022-12-19T09:44:04.047+00:00

    Hello there,

    The right channel would be to raise this via the feedback hub so that the Microsoft team can have a look into this. Meanwhile, you can share the error message generated when you run the Get-MsmqQueue to Remove-MsmqQueue so that we can have a look into the error code. Build a cleanup feature and add a queue by creating scheduled tasks on a remote computer to call a script created with the command and see if that helps.

    You can raise feedback to the Microsoft team. The Feedback Hub app lets you tell Microsoft about any problems you run into https://support.microsoft.com/en-us/windows/send-feedback-to-microsoft-with-the-feedback-hub-app-f59187f8-8739-22d6-ba93-f66612949332

    Similar discussion here https://social.technet.microsoft.com/Forums/windows/en-US/bec1c074-a650-43d0-b325-55e5e2d2554a/getmsmqqueue-cmdlet-is-throwing-object-not-found-exception-in-windows-2012-r2?forum=winserverpowershell

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.