You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/).
13
13
14
14
The PowerShell module provides cmdlets to assist with:
15
15
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
- 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
21
20
22
21
## Prerequisites
23
22
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
+
```
25
33
26
34
> [!NOTE]
27
35
> 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
30
38
31
39
The installation file for the module can be **[downloaded here](https://github.com/particular/NServiceBus.PowerShell/releases/latest)**.
32
40
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.
33
43
34
44
## Usage
35
45
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:
37
47
38
48
```ps
39
49
Import-Module NServiceBus.PowerShell
40
50
```
41
51
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.
43
53
44
54
Most of the cmdlets require elevated privileges; the module should be used in a PowerShell session that is launched with `Run As Administrator`.
45
55
46
-
47
56
## Help
48
57
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.
50
59
51
60
```ps
52
61
Get-Command -Module NServiceBus.PowerShell
53
62
```
54
63
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