Update Windows/PSPatching.ps1

bypass execution policy to avoid issue importing module
This commit is contained in:
Upgrayedd 2024-07-31 18:51:01 -05:00
parent 9faacc6258
commit b65e728162

View file

@ -1,6 +1,7 @@
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module PSWindowsUpdate -Force Install-Module PSWindowsUpdate -Force
Set-ExecutionPolicy bypass
Import-Module PSWindowsUpdate Import-Module PSWindowsUpdate