Update windows10.ps1

This commit is contained in:
simeononsecurity
2021-02-27 01:42:31 +00:00
committed by GitHub
parent 9762973251
commit 4e87d26ce5

View File

@ -22,9 +22,7 @@ Start-Job -Name "Installing Optional Windows Features" -ScriptBlock {
#https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.1
Install-PackageProvider -Name NuGet -Force
Install-Module -Name PowerShellGet -Force
Update-Module -Name PowerShellGet -Force
#https://github.com/PowerShell/PowerShellGetv2/issues/303
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-PackageProvider -Name PowerShellGet -Force -Scope CurrentUser
@ -39,7 +37,7 @@ Start-Job -Name "Installing Optional Windows Features" -ScriptBlock {
#https://www.powershellgallery.com/packages/PSWindowsUpdate/2.2.0.2
#https://www.powershellgallery.com/packages/SpeculationControl/1.0.14
#https://www.powershellgallery.com/packages/xCertificate/3.2.0.0
ForEach ($module in ("AnonUpload", "Carbon", "PoshInternals", "PowerShellProTools", "PSWindowsUpdate", "xCertificate")){
ForEach ($module in ("AnonUpload", "Carbon", "PoshInternals", "PowerShellGet", "PowerShellProTools", "PSWindowsUpdate", "xCertificate")){
Update-Module -Name $module -Force
Install-Module -Name $module -Force
Import-Module -Name $module -Force