Unable to install MSMQ Powershell module on Windows11

manikanth pothuganti 0 Reputation points

Hi Team,
I have a brand new Windows 11 (Enterprise edition) laptop on which I am trying to install MSMQ module using "Install-Module -Name MSMQ". I get a different error when trying to Import-Module -Name MSMQ

Install-module error:
"PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'MSMQ'. Try

Get-PSRepository to see all available registered module repositories.

At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\\PSModule.psm1:1809 char:21

  • ... $null = PackageManagement\Install-Package @PSBoundParameters
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex
    • FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage"

Import module error:
Import-Module : The module manifest cannot contain both the 'ModuleToProcess' and 'RootModule' members. Change the

module manifest file to remove one of these members at

'C:\windows\system32\WindowsPowerShell\v1.0\Modules\MSMQ\MSMQ.psd1', and then try again.

At line:1 char:1

  • Import-Module -Name MSMQ
        + CategoryInfo          : InvalidOperation: (C:\windows\syst...\MSMQ\MSMQ.psd1:String) [Import-Module], InvalidOpe
        + FullyQualifiedErrorId : Modules_ModuleManifestCannotContainBothModuleToProcessAndRootModule,Microsoft.PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,007 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,311 Reputation points Microsoft Vendor

    Hi manikanth pothuganti

    To use the MSMQ module, please open "Turn Windows features on or off" and select the Microsoft Message Queue (MSMQ) Server. You will be able to import the module after a reboot.

    Best Regards,

    Ian Xue

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments