Skip to content

Commit 8587bcc

Browse files
- Update management-using-powershell.md for accuracy and clarity in prerequisites and usage sections.
- Add warnings about support - Add additional links. - Add new Troubleshooting section. - Updated reviewed date. - Fix minor lint issues.
1 parent b33748b commit 8587bcc

File tree

1 file changed

+40
-13
lines changed

1 file changed

+40
-13
lines changed
Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
11
---
22
title: Management using PowerShell
33
summary: Install the infrastructure for NServiceBus on servers using PowerShell.
4-
reviewed: 2023-10-11
4+
reviewed: 2025-08-05
55
related:
66
- nservicebus/operations
77
redirects:
88
- nservicebus/managing-nservicebus-using-powershell
99
- nservicebus/operations/management-using-powershell
1010
---
1111

12-
A PowerShell module that sets up a computer to run NServiceBus with the MSMQ transport.
12+
A [PowerShell module](https://learn.microsoft.com/en-us/powershell/scripting/lang-spec/chapter-11?view=powershell-7.5) that sets up a computer to run NServiceBus with the [MSMQ transport](/transports/msmq/).
1313

1414
The PowerShell module provides cmdlets to assist with:
1515

16-
* Installing Microsoft Message Queuing Service (MSMQ)
17-
* Configuring Microsoft Distributed Transaction Coordinator (MSDTC)
18-
* Setting the addresses of the default Error and Audit queues for use by deployed Endpoints
19-
* Importing a Particular Platform license into the Registry
20-
16+
- Installing [Microsoft Message Queuing Service](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/msmq/ms711472(v=vs.85)) (MSMQ)
17+
- Configuring [Microsoft Distributed Transaction Coordinator](https://en.wikipedia.org/wiki/Microsoft_Distributed_Transaction_Coordinator) (MSDTC)
18+
- Setting the addresses of the default Error and Audit queues for use by deployed Endpoints
19+
- Importing a [Particular Platform license](/nservicebus/licensing/) into the Registry
2120

2221
## Prerequisites
2322

24-
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.
23+
Prior to installation, ensure that PowerShell 5 is installed. Versions of PowerShell later than 5, including PowerShell Core, are not supported by the module and may not work as expected.
24+
25+
> [!WARNING]
26+
> PowerShell 5 and under are [no longer supported](https://learn.microsoft.com/en-us/powershell/scripting/install/powershell-support-lifecycle?view=powershell-7.5#powershell-end-of-support-dates) by Microsoft.
27+
28+
You can confirm which PowerShell version you have installed by running the following PowerShell cmdlet.
29+
30+
```ps
31+
$PSVersionTable.PSVersion
32+
```
2533

2634
> [!NOTE]
2735
> In order to run PowerShell cmdlets, the PowerShell execution policy must be set to `Unrestricted` or a bypass must be granted to the module file. Refer to PowerShell documentation on how to change the execution policy.
@@ -30,26 +38,45 @@ Prior to installation ensure that PowerShell 2 or higher is installed. NServiceB
3038

3139
The installation file for the module can be **[downloaded here](https://github.com/particular/NServiceBus.PowerShell/releases/latest)**.
3240

41+
> [!WARNING]
42+
> The [NServiceBus.PowerShell](https://github.com/Particular/NServiceBus.PowerShell) repository used for MSMQ is no longer maintained, and has been archived. As MSMQ is not available for .NET (Core), building new systems using MSMQ is not recommended.
3343
3444
## Usage
3545

36-
After installation, the module can be loaded into a PowerShell session by issuing the following command:
46+
After installation, the module can be loaded into a PowerShell session by issuing the following PowerShell cmdlet:
3747

3848
```ps
3949
Import-Module NServiceBus.PowerShell
4050
```
4151

42-
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.
52+
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.
4353

4454
Most of the cmdlets require elevated privileges; the module should be used in a PowerShell session that is launched with `Run As Administrator`.
4555

46-
4756
## Help
4857

49-
A list of available cmdlets can be found by issuing the following PowerShell command
58+
A list of available cmdlets can be found by issuing the following PowerShell cmdlet.
5059

5160
```ps
5261
Get-Command -Module NServiceBus.PowerShell
5362
```
5463

55-
Help for each cmdlet is incorporated within the module. Help can be accessed via the [PowerShell Get-Help Command](https://technet.microsoft.com/en-us/library/ee176848.aspx), e.g. `Get-Help Set-NServiceBusLocalMachineSettings`.
64+
Help for each cmdlet is incorporated within the module. Help can be accessed via the [PowerShell Get-Help cmdlet](https://technet.microsoft.com/en-us/library/ee176848.aspx), e.g. `Get-Help Set-NServiceBusLocalMachineSettings`.
65+
66+
## Troubleshooting
67+
68+
If you encounter issues when using the NServiceBus.PowerShell module, consider the following troubleshooting steps:
69+
70+
- **Check PowerShell Version:** Ensure you are running PowerShell 5. Use the following PowerShell cmdlet to verify your version:
71+
72+
```ps
73+
$PSVersionTable.PSVersion
74+
```
75+
76+
- **Module Not Recognized:** If the module is not recognized, verify that the installation path is included in the `PSModulePath` environment variable. Restart your Windows session if necessary.
77+
78+
- **Execution Policy Errors:** If you receive errors related to script execution policies, ensure the policy is set to `Unrestricted` or that a bypass is granted to the module file. Refer to PowerShell documentation for details.
79+
80+
- **Administrator Privileges:** Some cmdlets require elevated privileges. Try running PowerShell as Administrator.
81+
82+
- **Module Maintenance:** The NServiceBus.PowerShell module is no longer maintained and may not be compatible with newer versions of Windows or PowerShell. Consider alternative approaches or transports if you encounter persistent issues.

0 commit comments

Comments
 (0)