From 1b2901f28ff7d798f71ac3ded3e1cfdcebfbe661 Mon Sep 17 00:00:00 2001 From: Thomas Faddegon Date: Wed, 2 Jun 2021 10:01:25 +0200 Subject: [PATCH] Add SecurityProtocolType Tls12 --- Tools/Run-RemoteWindowsUpdates.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/Run-RemoteWindowsUpdates.ps1 b/Tools/Run-RemoteWindowsUpdates.ps1 index a40daf8..b97841c 100644 --- a/Tools/Run-RemoteWindowsUpdates.ps1 +++ b/Tools/Run-RemoteWindowsUpdates.ps1 @@ -40,6 +40,7 @@ function Load-PSWindowsUpdate { if (([System.Environment]::OSVersion.Version).Major -ne 10){ Write-Error "Windows 10 required" }else{ + [Net.ServicePointManager]::SecurityProtocol += [Net.SecurityProtocolType]::Tls12 Install-PackageProvider NuGet -Force | Out-Null Set-PSRepository PSGallery -InstallationPolicy Trusted | Out-Null Install-Module PSWindowsUpdate -force -confirm:$false | Out-Null