From 0cd68997b622901015cc668d235e2318c386349b Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Fri, 2 Oct 2020 10:59:05 +0300 Subject: [PATCH 1/3] $ErrorActionPreference='Stop' for AllUsersAllHosts --- images/win/scripts/Installers/Configure-Toolset.ps1 | 2 -- images/win/scripts/Installers/Finalize-VM.ps1 | 5 ++--- images/win/scripts/Installers/Initialize-VM.ps1 | 3 +++ images/win/scripts/Installers/Install-AzureModules.ps1 | 2 -- images/win/scripts/Installers/Install-PHP.ps1 | 2 -- images/win/scripts/Installers/Install-PostgreSQL.ps1 | 2 -- images/win/scripts/Installers/Install-PowerShellModules.ps1 | 2 -- images/win/scripts/Installers/Install-PyPy.ps1 | 1 - images/win/scripts/Installers/Install-Sbt.ps1 | 2 -- images/win/scripts/Installers/Install-Toolset.ps1 | 2 -- images/win/scripts/Installers/Install-VS.ps1 | 2 -- images/win/scripts/Installers/Install-Vsix.ps1 | 2 -- images/win/scripts/Installers/Update-AndroidSDK.ps1 | 2 -- .../win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 | 2 -- 14 files changed, 5 insertions(+), 26 deletions(-) diff --git a/images/win/scripts/Installers/Configure-Toolset.ps1 b/images/win/scripts/Installers/Configure-Toolset.ps1 index a4fdba1f0..d83ea5c42 100644 --- a/images/win/scripts/Installers/Configure-Toolset.ps1 +++ b/images/win/scripts/Installers/Configure-Toolset.ps1 @@ -27,8 +27,6 @@ Function Set-DefaultVariables } } -$ErrorActionPreference = "Stop" - Import-Module -Name ImageHelpers -Force -DisableNameChecking # Define executables for cached tools diff --git a/images/win/scripts/Installers/Finalize-VM.ps1 b/images/win/scripts/Installers/Finalize-VM.ps1 index ab9e7080b..4e7a260c4 100644 --- a/images/win/scripts/Installers/Finalize-VM.ps1 +++ b/images/win/scripts/Installers/Finalize-VM.ps1 @@ -6,8 +6,6 @@ Write-Host "Cleanup WinSxS" Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase -$ErrorActionPreference = 'silentlycontinue' - Write-Host "Clean up various directories" @( "C:\\Recovery", @@ -30,4 +28,5 @@ Write-Host "Clean up various directories" $winInstallDir = "$env:windir\\Installer" New-Item -Path $winInstallDir -ItemType Directory -Force -$ErrorActionPreference = 'Continue' +# Remove AllUsersAllHosts profile +Remove-Item $profile.AllUsersAllHosts -Force diff --git a/images/win/scripts/Installers/Initialize-VM.ps1 b/images/win/scripts/Installers/Initialize-VM.ps1 index bd4619caa..ad853bb74 100644 --- a/images/win/scripts/Installers/Initialize-VM.ps1 +++ b/images/win/scripts/Installers/Initialize-VM.ps1 @@ -30,6 +30,9 @@ function Disable-UserAccessControl { Write-Host "User Access Control (UAC) has been disabled." } +# Enable $ErrorActionPreference='Stop' for AllUsersAllHosts +Add-Content -Path $profile.AllUsersAllHosts -Value '$ErrorActionPreference="Stop"' + # Set TLS1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12" diff --git a/images/win/scripts/Installers/Install-AzureModules.ps1 b/images/win/scripts/Installers/Install-AzureModules.ps1 index d03100bd3..a12dec60c 100644 --- a/images/win/scripts/Installers/Install-AzureModules.ps1 +++ b/images/win/scripts/Installers/Install-AzureModules.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Azure PowerShell modules ################################################################################ -$ErrorActionPreference = "Stop" - # The correct Modules need to be saved in C:\Modules $installPSModulePath = $env:PSMODULES_ROOT_FOLDER if (-not (Test-Path -LiteralPath $installPSModulePath)) diff --git a/images/win/scripts/Installers/Install-PHP.ps1 b/images/win/scripts/Installers/Install-PHP.ps1 index a51c0e276..f629af21a 100644 --- a/images/win/scripts/Installers/Install-PHP.ps1 +++ b/images/win/scripts/Installers/Install-PHP.ps1 @@ -2,8 +2,6 @@ ## File: Install-PHP.ps1 ## Desc: Install PHP ################################################################################ -$ErrorActionPreference = "Stop" - Import-Module -Name ImageHelpers # Install latest PHP in chocolatey diff --git a/images/win/scripts/Installers/Install-PostgreSQL.ps1 b/images/win/scripts/Installers/Install-PostgreSQL.ps1 index 7d46d43ec..0f88bb7f4 100644 --- a/images/win/scripts/Installers/Install-PostgreSQL.ps1 +++ b/images/win/scripts/Installers/Install-PostgreSQL.ps1 @@ -1,5 +1,3 @@ -$ErrorActionPreference = "Stop" - #Define user and password for PostgreSQL database $pgUser = "postgres" $pgPwd = "root" diff --git a/images/win/scripts/Installers/Install-PowerShellModules.ps1 b/images/win/scripts/Installers/Install-PowerShellModules.ps1 index f6cb22d03..f0afb9e6c 100644 --- a/images/win/scripts/Installers/Install-PowerShellModules.ps1 +++ b/images/win/scripts/Installers/Install-PowerShellModules.ps1 @@ -1,5 +1,3 @@ -$ErrorActionPreference = "Stop" - # Set TLS1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12" diff --git a/images/win/scripts/Installers/Install-PyPy.ps1 b/images/win/scripts/Installers/Install-PyPy.ps1 index af1b11820..01739ddaa 100644 --- a/images/win/scripts/Installers/Install-PyPy.ps1 +++ b/images/win/scripts/Installers/Install-PyPy.ps1 @@ -82,7 +82,6 @@ function Install-PyPy } } -$ErrorActionPreference = "Stop" Import-Module -Name ImageHelpers -Force -DisableNameChecking # Get PyPy content from toolset diff --git a/images/win/scripts/Installers/Install-Sbt.ps1 b/images/win/scripts/Installers/Install-Sbt.ps1 index fc8b6a509..1be6d234a 100644 --- a/images/win/scripts/Installers/Install-Sbt.ps1 +++ b/images/win/scripts/Installers/Install-Sbt.ps1 @@ -2,8 +2,6 @@ ## File: Install-Sbt.ps1 ## Desc: Install sbt for Windows ################################################################################ -$ErrorActionPreference = "Stop" - Import-Module -Name ImageHelpers # Install the latest version of sbt. diff --git a/images/win/scripts/Installers/Install-Toolset.ps1 b/images/win/scripts/Installers/Install-Toolset.ps1 index 42cdbaf25..d3aaba785 100644 --- a/images/win/scripts/Installers/Install-Toolset.ps1 +++ b/images/win/scripts/Installers/Install-Toolset.ps1 @@ -29,8 +29,6 @@ Function Install-Asset { Pop-Location } -$ErrorActionPreference = "Stop" - Import-Module -Name ImageHelpers -Force # Get toolcache content from toolset diff --git a/images/win/scripts/Installers/Install-VS.ps1 b/images/win/scripts/Installers/Install-VS.ps1 index ed4fca73f..4c1ce9528 100644 --- a/images/win/scripts/Installers/Install-VS.ps1 +++ b/images/win/scripts/Installers/Install-VS.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Visual Studio ################################################################################ -$ErrorActionPreference = "Stop" - $toolset = Get-ToolsetContent $requiredComponents = $toolset.visualStudio.workloads | ForEach-Object { "--add $_" } $workLoads = @( diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 4e6062a28..628b643b2 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -3,8 +3,6 @@ ## Desc: Install the Visual Studio Extensions from toolset.json ################################################################################### -$ErrorActionPreference = "Stop" - $toolset = Get-ToolsetContent $vsixPackagesList = $toolset.visualStudio.vsix if (-not $vsixPackagesList) { diff --git a/images/win/scripts/Installers/Update-AndroidSDK.ps1 b/images/win/scripts/Installers/Update-AndroidSDK.ps1 index c27a4c18c..a6a201311 100644 --- a/images/win/scripts/Installers/Update-AndroidSDK.ps1 +++ b/images/win/scripts/Installers/Update-AndroidSDK.ps1 @@ -3,8 +3,6 @@ ## Desc: Install and update Android SDK and tools ################################################################################ -$ErrorActionPreference = "Stop" - # Install the standard Android SDK licenses. In the past, there wasn't a better way to do this, # so we are base64-encoding a zip of the licenses directory from another installation. # To create this base64 string, create a zip file that contains nothing but a 'licenses' folder, diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 2f45ecde1..28a07dce9 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -1,5 +1,3 @@ -$ErrorActionPreference = "Stop" - Import-Module MarkdownPS Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Android.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableNameChecking From 64b2205f5c384a38309f80c4a1812941fd4789c8 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Fri, 2 Oct 2020 11:37:55 +0300 Subject: [PATCH 2/3] TOOLSET_JSON_PATH Update-DockerImages.ps1" --- images/win/Windows2016-Azure.json | 7 +------ images/win/Windows2019-Azure.json | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 77d57aef1..34c1abcb3 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -160,12 +160,6 @@ "type": "windows-restart", "restart_timeout": "30m" }, - { - "type": "powershell", - "scripts": [ - "{{ template_dir }}/scripts/Installers/Update-DockerImages.ps1" - ] - }, { "type": "powershell", "valid_exit_codes": [ @@ -176,6 +170,7 @@ "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" ], "scripts": [ + "{{ template_dir }}/scripts/Installers/Update-DockerImages.ps1", "{{ template_dir }}/scripts/Installers/Install-VS.ps1", "{{ template_dir }}/scripts/Installers/Install-NET48.ps1", "{{ template_dir }}/scripts/Installers/Windows2016/Install-SSDT.ps1" diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 473051dba..1d061fd1d 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -168,12 +168,6 @@ "type": "windows-restart", "restart_timeout": "10m" }, - { - "type": "powershell", - "scripts": [ - "{{ template_dir }}/scripts/Installers/Update-DockerImages.ps1" - ] - }, { "type": "powershell", "valid_exit_codes": [ @@ -184,6 +178,7 @@ "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" ], "scripts": [ + "{{ template_dir }}/scripts/Installers/Update-DockerImages.ps1", "{{ template_dir }}/scripts/Installers/Install-VS.ps1", "{{ template_dir }}/scripts/Installers/Install-NET48.ps1" ], From 4ef13d58ee37ba0427b46e3cd8486664f5ee7cf7 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 5 Oct 2020 09:17:49 +0300 Subject: [PATCH 3/3] remove import ImageHelpers module --- images/win/scripts/Installers/Configure-Toolset.ps1 | 2 -- images/win/scripts/Installers/Download-ToolCache.ps1 | 2 -- .../win/scripts/Installers/Install-AzureCosmosDbEmulator.ps1 | 2 -- images/win/scripts/Installers/Install-Chrome.ps1 | 2 -- images/win/scripts/Installers/Install-CloudFoundryCli.ps1 | 2 -- images/win/scripts/Installers/Install-DACFx.ps1 | 2 -- images/win/scripts/Installers/Install-Firefox.ps1 | 2 -- images/win/scripts/Installers/Install-Git.ps1 | 2 -- images/win/scripts/Installers/Install-JavaTools.ps1 | 2 -- images/win/scripts/Installers/Install-Miniconda.ps1 | 2 -- images/win/scripts/Installers/Install-NET48.ps1 | 2 -- images/win/scripts/Installers/Install-NodeLts.ps1 | 2 -- images/win/scripts/Installers/Install-PHP.ps1 | 1 - images/win/scripts/Installers/Install-PyPy.ps1 | 2 -- images/win/scripts/Installers/Install-Rust.ps1 | 2 -- images/win/scripts/Installers/Install-SQLPowerShellTools.ps1 | 2 -- images/win/scripts/Installers/Install-Sbt.ps1 | 1 - images/win/scripts/Installers/Install-Selenium.ps1 | 2 -- images/win/scripts/Installers/Install-Toolset.ps1 | 2 -- images/win/scripts/Installers/Install-Vcpkg.ps1 | 2 -- images/win/scripts/Installers/Install-WDK.ps1 | 3 --- images/win/scripts/Installers/Install-WinAppDriver.ps1 | 2 -- images/win/scripts/Installers/Install-Wix.ps1 | 2 -- images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 | 2 -- images/win/scripts/Installers/Windows2016/Install-Win81SDK.ps1 | 2 -- 25 files changed, 49 deletions(-) diff --git a/images/win/scripts/Installers/Configure-Toolset.ps1 b/images/win/scripts/Installers/Configure-Toolset.ps1 index d83ea5c42..9e067ade2 100644 --- a/images/win/scripts/Installers/Configure-Toolset.ps1 +++ b/images/win/scripts/Installers/Configure-Toolset.ps1 @@ -27,8 +27,6 @@ Function Set-DefaultVariables } } -Import-Module -Name ImageHelpers -Force -DisableNameChecking - # Define executables for cached tools $toolsEnvironmentVariables = @{ Python = @{ diff --git a/images/win/scripts/Installers/Download-ToolCache.ps1 b/images/win/scripts/Installers/Download-ToolCache.ps1 index 6c93e3804..8656fb6a7 100644 --- a/images/win/scripts/Installers/Download-ToolCache.ps1 +++ b/images/win/scripts/Installers/Download-ToolCache.ps1 @@ -62,8 +62,6 @@ Function Set-DefaultRubyVersion { Invoke-Expression "gem update --system" } -Import-Module -Name ImageHelpers -Force - $FeedPrefix = "https://npm.pkg.github.com" $AccessToken = $env:GITHUB_FEED_TOKEN diff --git a/images/win/scripts/Installers/Install-AzureCosmosDbEmulator.ps1 b/images/win/scripts/Installers/Install-AzureCosmosDbEmulator.ps1 index 52c99f267..ba7922a73 100644 --- a/images/win/scripts/Installers/Install-AzureCosmosDbEmulator.ps1 +++ b/images/win/scripts/Installers/Install-AzureCosmosDbEmulator.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Azure CosmosDb Emulator #################################################################################### -Import-Module -Name ImageHelpers -Force - $InstallerName = "AzureCosmosDBEmulator.msi" $InstallerUrl = "https://aka.ms/cosmosdb-emulator" diff --git a/images/win/scripts/Installers/Install-Chrome.ps1 b/images/win/scripts/Installers/Install-Chrome.ps1 index 5e1d6ae48..790ec09f0 100644 --- a/images/win/scripts/Installers/Install-Chrome.ps1 +++ b/images/win/scripts/Installers/Install-Chrome.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Google Chrome ################################################################################ -Import-Module -Name ImageHelpers -Force - # Download and install latest Chrome browser $ChromeInstallerFile = "chrome_installer.exe" $ChromeInstallerUrl = "https://dl.google.com/chrome/install/375.126/${ChromeInstallerFile}" diff --git a/images/win/scripts/Installers/Install-CloudFoundryCli.ps1 b/images/win/scripts/Installers/Install-CloudFoundryCli.ps1 index 65831bd7d..2bc7e4b0d 100644 --- a/images/win/scripts/Installers/Install-CloudFoundryCli.ps1 +++ b/images/win/scripts/Installers/Install-CloudFoundryCli.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Cloud Foundry CLI ################################################################################ -Import-Module -Name ImageHelpers - # Download the latest cf cli exe $CloudFoundryCliName = "cf-cli.zip" $CloudFoundryCliUrl = "https://packages.cloudfoundry.org/stable?release=windows64-exe&source=github" diff --git a/images/win/scripts/Installers/Install-DACFx.ps1 b/images/win/scripts/Installers/Install-DACFx.ps1 index fb50af0d9..2160b1dcc 100644 --- a/images/win/scripts/Installers/Install-DACFx.ps1 +++ b/images/win/scripts/Installers/Install-DACFx.ps1 @@ -3,8 +3,6 @@ ## Desc: Install SQL ServerĀ® Data-Tier Application Framework (DACFx) for Windows #################################################################################### -Import-Module -Name ImageHelpers -Force - $InstallerName = "DacFramework.msi" $InstallerUrl = "https://go.microsoft.com/fwlink/?linkid=2134206" diff --git a/images/win/scripts/Installers/Install-Firefox.ps1 b/images/win/scripts/Installers/Install-Firefox.ps1 index 979a7b4b4..f66a72e1b 100644 --- a/images/win/scripts/Installers/Install-Firefox.ps1 +++ b/images/win/scripts/Installers/Install-Firefox.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Mozilla Firefox ################################################################################ -Import-Module -Name ImageHelpers -Force - # Install and configure Firefox browser Write-Host "Install latest Firefox browser..." $VersionsManifest = Invoke-RestMethod "https://product-details.mozilla.org/1.0/firefox_versions.json" diff --git a/images/win/scripts/Installers/Install-Git.ps1 b/images/win/scripts/Installers/Install-Git.ps1 index 2a5ea9259..32de0e644 100644 --- a/images/win/scripts/Installers/Install-Git.ps1 +++ b/images/win/scripts/Installers/Install-Git.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Git for Windows ################################################################################ -Import-Module -Name ImageHelpers - function getSimpleValue([string] $url, [string] $filename ) { $fullpath = "${env:Temp}\$filename" Invoke-WebRequest -Uri $url -OutFile $fullpath diff --git a/images/win/scripts/Installers/Install-JavaTools.ps1 b/images/win/scripts/Installers/Install-JavaTools.ps1 index 04a56a914..4852f64c1 100644 --- a/images/win/scripts/Installers/Install-JavaTools.ps1 +++ b/images/win/scripts/Installers/Install-JavaTools.ps1 @@ -3,8 +3,6 @@ ## Desc: Install various JDKs and java tools ################################################################################ -Import-Module -Name ImageHelpers -Force - function Set-JavaPath { param ( [string] $Version, diff --git a/images/win/scripts/Installers/Install-Miniconda.ps1 b/images/win/scripts/Installers/Install-Miniconda.ps1 index 6f716b509..0b2f59c88 100644 --- a/images/win/scripts/Installers/Install-Miniconda.ps1 +++ b/images/win/scripts/Installers/Install-Miniconda.ps1 @@ -3,8 +3,6 @@ ## Desc: Install the latest version of Miniconda and set $env:CONDA ################################################################################ -Import-Module -Name ImageHelpers -Force - $CondaDestination = "C:\Miniconda" # Lock to Miniconda 4.6 until we do the work to run `conda init` for the vsts user diff --git a/images/win/scripts/Installers/Install-NET48.ps1 b/images/win/scripts/Installers/Install-NET48.ps1 index ef343b530..ef26a3c06 100644 --- a/images/win/scripts/Installers/Install-NET48.ps1 +++ b/images/win/scripts/Installers/Install-NET48.ps1 @@ -3,8 +3,6 @@ ## Desc: Install .NET 4.8 ################################################################################ -Import-Module -Name ImageHelpers -Force - # .NET 4.8 Dev pack $InstallerName = "ndp48-devpack-enu.exe" $InstallerUrl = "https://download.visualstudio.microsoft.com/download/pr/014120d7-d689-4305-befd-3cb711108212/0307177e14752e359fde5423ab583e43/${InstallerName}" diff --git a/images/win/scripts/Installers/Install-NodeLts.ps1 b/images/win/scripts/Installers/Install-NodeLts.ps1 index 8dc4559ed..a44a04fbc 100644 --- a/images/win/scripts/Installers/Install-NodeLts.ps1 +++ b/images/win/scripts/Installers/Install-NodeLts.ps1 @@ -4,8 +4,6 @@ ## Must run after python is configured ################################################################################ -Import-Module -Name ImageHelpers -Force - $PrefixPath = 'C:\npm\prefix' $CachePath = 'C:\npm\cache' diff --git a/images/win/scripts/Installers/Install-PHP.ps1 b/images/win/scripts/Installers/Install-PHP.ps1 index f629af21a..7e766bbae 100644 --- a/images/win/scripts/Installers/Install-PHP.ps1 +++ b/images/win/scripts/Installers/Install-PHP.ps1 @@ -2,7 +2,6 @@ ## File: Install-PHP.ps1 ## Desc: Install PHP ################################################################################ -Import-Module -Name ImageHelpers # Install latest PHP in chocolatey $installDir = "c:\tools\php" diff --git a/images/win/scripts/Installers/Install-PyPy.ps1 b/images/win/scripts/Installers/Install-PyPy.ps1 index 01739ddaa..8b029f024 100644 --- a/images/win/scripts/Installers/Install-PyPy.ps1 +++ b/images/win/scripts/Installers/Install-PyPy.ps1 @@ -82,8 +82,6 @@ function Install-PyPy } } -Import-Module -Name ImageHelpers -Force -DisableNameChecking - # Get PyPy content from toolset $pypyTools = Get-ToolsetContent | Select-Object -ExpandProperty toolcache | Where-Object Name -eq "PyPy" diff --git a/images/win/scripts/Installers/Install-Rust.ps1 b/images/win/scripts/Installers/Install-Rust.ps1 index 35e16dcd9..294a1370f 100644 --- a/images/win/scripts/Installers/Install-Rust.ps1 +++ b/images/win/scripts/Installers/Install-Rust.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Rust for Windows ################################################################################ -Import-Module -Name ImageHelpers - # Rust Env $env:RUSTUP_HOME = "C:\Rust\.rustup" $env:CARGO_HOME = "C:\Rust\.cargo" diff --git a/images/win/scripts/Installers/Install-SQLPowerShellTools.ps1 b/images/win/scripts/Installers/Install-SQLPowerShellTools.ps1 index 7c0a3cfd1..60cbbefaf 100644 --- a/images/win/scripts/Installers/Install-SQLPowerShellTools.ps1 +++ b/images/win/scripts/Installers/Install-SQLPowerShellTools.ps1 @@ -3,8 +3,6 @@ ## Desc: Install SQL PowerShell tool ################################################################################ -Import-Module -Name ImageHelpers -Force - $BaseUrl = "https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64" # install required MSIs diff --git a/images/win/scripts/Installers/Install-Sbt.ps1 b/images/win/scripts/Installers/Install-Sbt.ps1 index 1be6d234a..cfc37f5b8 100644 --- a/images/win/scripts/Installers/Install-Sbt.ps1 +++ b/images/win/scripts/Installers/Install-Sbt.ps1 @@ -2,7 +2,6 @@ ## File: Install-Sbt.ps1 ## Desc: Install sbt for Windows ################################################################################ -Import-Module -Name ImageHelpers # Install the latest version of sbt. # See https://chocolatey.org/packages/sbt diff --git a/images/win/scripts/Installers/Install-Selenium.ps1 b/images/win/scripts/Installers/Install-Selenium.ps1 index d49ad082d..c1f2ce152 100644 --- a/images/win/scripts/Installers/Install-Selenium.ps1 +++ b/images/win/scripts/Installers/Install-Selenium.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Selenium Server standalone ################################################################################ -Import-Module -Name ImageHelpers -Force - # Acquire latest Selenium release number from GitHub API $latestReleaseUrl = "https://api.github.com/repos/SeleniumHQ/selenium/releases/latest" try { diff --git a/images/win/scripts/Installers/Install-Toolset.ps1 b/images/win/scripts/Installers/Install-Toolset.ps1 index d3aaba785..5a8b3689f 100644 --- a/images/win/scripts/Installers/Install-Toolset.ps1 +++ b/images/win/scripts/Installers/Install-Toolset.ps1 @@ -29,8 +29,6 @@ Function Install-Asset { Pop-Location } -Import-Module -Name ImageHelpers -Force - # Get toolcache content from toolset $ToolsToInstall = @("Python", "Node", "Boost", "Go") diff --git a/images/win/scripts/Installers/Install-Vcpkg.ps1 b/images/win/scripts/Installers/Install-Vcpkg.ps1 index f4b44f98e..4360b2d35 100644 --- a/images/win/scripts/Installers/Install-Vcpkg.ps1 +++ b/images/win/scripts/Installers/Install-Vcpkg.ps1 @@ -3,8 +3,6 @@ ## Desc: Install vcpkg ################################################################################ -Import-Module -Name ImageHelpers -Force - $Uri = 'https://github.com/Microsoft/vcpkg.git' $InstallDir = 'C:\vcpkg' $VcpkgExecPath = 'vcpkg.exe' diff --git a/images/win/scripts/Installers/Install-WDK.ps1 b/images/win/scripts/Installers/Install-WDK.ps1 index 54f08cc92..82690c801 100644 --- a/images/win/scripts/Installers/Install-WDK.ps1 +++ b/images/win/scripts/Installers/Install-WDK.ps1 @@ -4,9 +4,6 @@ ################################################################################ # Requires Windows SDK with the same version number as the WDK - -Import-Module -Name ImageHelpers -Force - if (Test-IsWin19) { $winSdkUrl = "https://go.microsoft.com/fwlink/p/?linkid=2120843" diff --git a/images/win/scripts/Installers/Install-WinAppDriver.ps1 b/images/win/scripts/Installers/Install-WinAppDriver.ps1 index fc79ff993..38745dd92 100644 --- a/images/win/scripts/Installers/Install-WinAppDriver.ps1 +++ b/images/win/scripts/Installers/Install-WinAppDriver.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Windows Application Driver (WinAppDriver) #################################################################################### -Import-Module -Name ImageHelpers -Force - $InstallerName = "WindowsApplicationDriver.msi" $InstallerUrl = "https://github.com/Microsoft/WinAppDriver/releases/download/v1.1/${InstallerName}" diff --git a/images/win/scripts/Installers/Install-Wix.ps1 b/images/win/scripts/Installers/Install-Wix.ps1 index 63305f57f..88ef31b29 100644 --- a/images/win/scripts/Installers/Install-Wix.ps1 +++ b/images/win/scripts/Installers/Install-Wix.ps1 @@ -3,8 +3,6 @@ ## Desc: Install WIX. ################################################################################ -Import-Module -Name ImageHelpers -Force - Choco-Install -PackageName wixtoolset -ArgumentList "--force" if(Test-IsWin19) diff --git a/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 b/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 index b39a547d2..e67d0cb2a 100644 --- a/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 +++ b/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 @@ -3,8 +3,6 @@ ## Desc: Install SQL Server Data Tools for Windows ################################################################################ -Import-Module -Name ImageHelpers -Force - #SSDT for Visual Studio 2017 #The link down below points to the latest version of SSDT for Visual Studio 2017 $InstallerName = "SSDT-Setup-ENU.exe" diff --git a/images/win/scripts/Installers/Windows2016/Install-Win81SDK.ps1 b/images/win/scripts/Installers/Windows2016/Install-Win81SDK.ps1 index d89f468fa..897b8bffe 100644 --- a/images/win/scripts/Installers/Windows2016/Install-Win81SDK.ps1 +++ b/images/win/scripts/Installers/Windows2016/Install-Win81SDK.ps1 @@ -3,8 +3,6 @@ ## Desc: Install Windows 8.1 SDK ################################################################################ -Import-Module -Name ImageHelpers -Force - $InstallerName = "sdksetup.exe" $InstallerUrl = "http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/${InstallerName}" $ArgumentList = ("/quiet", "/norestart")