PowerShell-Scripts icon indicating copy to clipboard operation
PowerShell-Scripts copied to clipboard

Add SecurityProtocolType Tls12

Open L0g0ff opened this issue 3 years ago • 0 comments

Hi, Thanks for you great work and make your code public 👍

Can you please add the Tls12 line in your code so this will work on Windows 2016 server? The Tls12 line will fix this.

Without the line you get these errors:

PS C:\scripts> .\Run-RemoteWindowsUpdate.ps1 -ComputerName localhost
Connecting to localhost
WARNING: PSWindowsUpdate not found. Installing module
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.
WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''.
No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires
'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.
    + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-Pac
   kageProvider], Exception
    + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackagePro
   vider
    + PSComputerName        : localhost

Cannot retrieve the dynamic parameters for the cmdlet. PowerShell Gallery is currently unavailable.  Please try again
later.
    + CategoryInfo          : InvalidArgument: (:) [Set-PSRepository], ParameterBindingException
    + FullyQualifiedErrorId : GetDynamicParametersException,Set-PSRepository
    + PSComputerName        : localhost

L0g0ff avatar Jun 02 '21 08:06 L0g0ff