Powershell install - No match was found for the specified search criteria and module name
I ran into the same error installing different module. My fix was specifying TLS1.2 for the .net Security protocol.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Thanks to Stephen, rouxquasar it worked with below order for me Windows 2016 Datacenter, KB4598243, Execution policy was set properly so didn't have to deal with that.
Enable
TLS 1.2
:[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Register the default PS Gallery Repo (may check
Get-PSRepository | fl*
just incase)Register-PSRepository -Default
Install-Module dbatools
(checkFind-Module
before to validate)
Use -Force
switch if an older version of dbatools
exists.