A PowerShell module that sets up a computer to run NServiceBus.
The PowerShell module provides cmdlets to assist with:
- Installing Microsoft Message Queuing Service (MSMQ)
- Configuring Microsoft Distributed Transaction Coordinator (MSDTC)
- Setting the addresses of the default Error and Audit queues for use by deployed Endpoints
- Importing a Particular Platform license into the Registry
- Removing a worker from a Distributor
Prior to installation ensure that PowerShell 2 or higher is installed. NServiceBus PowerShell modules are compatible with PowerShell 5. Versions of PowerShell later than 5 (including PowerShell Core) are not supported and might not work as expected.
Unrestrictedor a bypass neds to be granted to the module file. Refer to PowerShell documentation on how to change the execution policy.
The installation file for the module can be downloaded here.
After installation the module can be loaded into a PowerShell session by issuing the following command:
The installation adds the NServiceBus.PowerShell module location to the
PSModulePath environment variable. If the module isn't available restarting the Windows session may be required for this change to take effect.
As most of the cmdlets require elevated privileges the module should be used in a PowerShell session that is launched with
Run As Administrator.
A list of available cmdlets can be found by issuing the following PowerShell command
Get-Command -Module NServiceBus.PowerShell
Help for each cmdlet is incorporated within the module. Help can be accessed via the standard PowerShell Get-Help Command, e.g.