Updates to PowerShell modules
The PowerShell modules for NServiceBus and ServiceControl are lesser-known, but important, tools in the Particular Software toolbox. Both provide crucial support for automation when deploying NServiceBus endpoints and ServiceControl instances in DevOps workflows.
We’ve updated the packages for both PowerShell modules to support PowerShell 5 and to make them easier to use.
🔗PowerShell 5
We’ve updated each PowerShell module to support PowerShell 5. In each case, we aim to strike a balance between the widest framework support and the constraints of that particular package.
NServiceBus.PowerShell targets .NET Framework 4.5.2, which is the same version of .NET Framework supported by NServiceBus version 7.
The ServiceControl.PowerShell module now requires .NET Framework 4.7.2, because it must enforce the same minimum requirement as ServiceControl itself.
If you require support for older versions of the .NET Framework, you can continue to use older versions of the PowerShell packages.
🔗Module installation
Our PowerShell modules are now globally accessible, making them easier to find and use than before. This is done by adding the installation paths to the PSModulesPath
environment variable so that the packages are imported implicitly.
The new installation paths for the NServiceBus and ServiceControl PowerShell modules are:
%ProgramFiles%\Particular Software\NServiceBus.PowerShell
%ProgramFiles%\Particular Software\ServiceControl Management\ServiceControlMgmt
You no longer need to import the modules or know where they are installed on your machine. You can check if the modules are detected by your PowerShell session by running Get-Module -ListAvailable
.
Both modules will work in the x64 version of PowerShell as well as the x86 version so you can use whichever version works on your machine.
🔗Better error reporting
The new versions of the cmdlets now provide errors and warnings in a more consistent manner. If there is an issue when calling a cmdlet, an exception is thrown so that your scripts are halted. Before, cmdlets would not have consistently done this, making it difficult to guard against error cases in your scripts.
Also, in cases when there is more than one validation error/warning, they all get logged so you don’t have to fix them one by one.
🔗Summary
The latest release of our PowerShell packages, consisting of NServiceBus.PowerShell and ServiceControl.PowerShell supports newer versions of PowerShell and is easier to use.
You can download the NServiceBus.PowerShell installer directly from GitHub.
The ServiceControl.PowerShell module is installed as part of the ServiceControl installer, which you can get on our downloads page.