Install-Package : No match was found for the specified search criteria and package name ‘PsWindowsUpdate’. Try Get-PackageSource to see all available registered package sources.

Yeah, thanks M$, that’s what i always think when i just want to execute a basic task and i get a %&ç*% error message. I always install PsWindowsUpdate to manage Windows Updates on Servers and Workstations i’m responsible for because GUIs.. well, they limit you somehow..
Now, i got this error message again .. it’s maybe the 50th time or more .. i didn’t read too much about why this error messages shows up .. i’m getting old, yeah. But whenever i got this message the last (felt-like) 1000 times, i used the same solution:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

by the way, the complete error message is:

PS C:\Windows\system32> Install-Package PsWindowsUpdate
WARNING: MSG:UnableToDownload «https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409» «»
WARNING: Unable to download the list of available providers. Check your internet connection.
Install-Package : No match was found for the specified search criteria and package name ‘PsWindowsUpdate’. Try
Get-PackageSource to see all available registered package sources.
At line:1 char:1

  • Install-Package PsWindowsUpdate
  • ~~~~~~~
    • CategoryInfo : ObjectNotFound: (Microsoft.Power….InstallPackage:InstallPackage) [Install-Package], Ex
      ception
    • FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

if you still get the message, do a:

Register-PSRepository -Default

And try it again. More and more i think we should all should switch to Linux, especially for the server part/services. i mean maintaining an infrastructure with windows server can really go beyond any budget!