I have running the following Powershell script as part of an Octopus Deploy.
However, I only want them to install if they are not already installed.
I they are installed, preferably it would also only install them if they are below a certain version.
Can someone advise what is considered to be the best approach for doing this?
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Confirm:$False -Force
Install-Module -Name SqlServer -AllowClobber -Confirm:$False -Force