Sometimes when installing powershell modules, you may wish to utilise pre-release or preview versions of packages. Depending on what version of powershell you have installed, you may get an error message like the one below when attempting to install preview/prerelease packages;
Install-Module : A parameter cannot be found that matches parameter name 'AllowPrerelease'.
At line:1 char:37
To fix the problem you need to force an update of a couple of Powershell modules - namely PowershellGet and PackageManagement.
Run the commands below from an elevated powershell command prompt;
Install-Module -Name PowerShellGet -Repository PSGallery -Force
Install-Module -Name PackageManagement -Repository PSGallery -Force
No comments:
Post a Comment