diff --git a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 b/images/win/scripts/ImageHelpers/ImageHelpers.psm1
index c2007855..c4485493 100644
--- a/images/win/scripts/ImageHelpers/ImageHelpers.psm1
+++ b/images/win/scripts/ImageHelpers/ImageHelpers.psm1
@@ -3,7 +3,6 @@ param()
. $PSScriptRoot\PathHelpers.ps1
. $PSScriptRoot\InstallHelpers.ps1
-. $PSScriptRoot\MarkdownHelpers.ps1
. $PSScriptRoot\ChocoHelpers.ps1
Export-ModuleMember -Function @(
@@ -18,8 +17,6 @@ Export-ModuleMember -Function @(
'Get-ToolcachePackages'
'Get-ToolsetContent'
'Get-ToolsByName'
- 'Add-ContentToMarkdown'
- 'Add-SoftwareDetailsToMarkdown'
'Stop-SvcWithErrHandling'
'Set-SvcWithErrHandling'
'Start-DownloadWithRetry'
diff --git a/images/win/scripts/ImageHelpers/MarkdownHelpers.ps1 b/images/win/scripts/ImageHelpers/MarkdownHelpers.ps1
deleted file mode 100644
index 49becbc9..00000000
--- a/images/win/scripts/ImageHelpers/MarkdownHelpers.ps1
+++ /dev/null
@@ -1,25 +0,0 @@
-function Add-ContentToMarkdown {
-
- param(
- $Content = ""
- )
-
- Add-Content 'C:\InstalledSoftware.md' $Content
-}
-
-
-function Add-SoftwareDetailsToMarkdown {
- [CmdletBinding()]
- param(
- $SoftwareName = "",
- $DescriptionMarkdown = ""
- )
-
-$Content = @"
-
-## $SoftwareName
-
-$DescriptionMarkdown
-"@
- Add-ContentToMarkdown -Content $Content
-}
diff --git a/images/win/scripts/Installers/Install-AWS.ps1 b/images/win/scripts/Installers/Install-AWS.ps1
index b5ad9a6d..23a5c4d4 100644
--- a/images/win/scripts/Installers/Install-AWS.ps1
+++ b/images/win/scripts/Installers/Install-AWS.ps1
@@ -5,27 +5,13 @@
Choco-Install -PackageName awscli
-$env:PATH =$env:PATH + ";$Env:Programfiles\Amazon\AWSCLIV2"
-
-$command = Get-Command -Name 'aws'
-
-if ($command)
+$env:Path = $env:Path + ";$env:ProgramFiles\Amazon\AWSCLIV2"
+if (Get-Command -Name 'aws')
{
- Write-Host "awscli on path"
+ Write-Host 'awscli on path'
}
else
{
Write-Host 'awscli is not on path'
exit 1
}
-
-# Adding description of the software to Markdown
-$SoftwareName = "AWS CLI"
-
-$version = (aws --version).Split(" ")[0].Replace("/"," ")
-
-$Description = @"
-_Version:_ $version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Update-AndroidSDK.ps1 b/images/win/scripts/Installers/Update-AndroidSDK.ps1
index 51b6b50c..cd7d1d0c 100644
--- a/images/win/scripts/Installers/Update-AndroidSDK.ps1
+++ b/images/win/scripts/Installers/Update-AndroidSDK.ps1
@@ -100,7 +100,7 @@ Push-Location -Path $sdk.FullName
# Android NDK root path.
$ndk_root = "C:\Program Files (x86)\Android\android-sdk\ndk-bundle"
- if (Test-Path $ndk_root){
+ if (Test-Path $ndk_root){
setx ANDROID_HOME $sdk_root /M
setx ANDROID_NDK_HOME $ndk_root /M
setx ANDROID_NDK_PATH $ndk_root /M
@@ -111,43 +111,3 @@ Push-Location -Path $sdk.FullName
Pop-Location
-# Adding description of the software to Markdown
-$Header = @"
-
-## Android SDK Build Tools
-
-"@
-
-Add-ContentToMarkdown -Content $Header
-
-$BuildTools =(Get-ChildItem "C:\Program Files (x86)\Android\android-sdk\build-tools\") `
- | Where { $_.Name -match "[0-9].*" } `
- | Sort-Object -Descending `
- | % { "#### $($_.Name)`n`n_Location:_ $($_.FullName)`n" }
-
-Add-ContentToMarkdown -Content $BuildTools
-
-
-# Adding description of the software to Markdown
-$Header = @"
-
-## Android SDK Platforms
-
-"@
-
-Add-ContentToMarkdown -Content $Header
-
-$SdkList =(Get-ChildItem "C:\Program Files (x86)\Android\android-sdk\platforms\") | Sort-Object -Descending | %{ $_.FullName }
-
-foreach($sdk in $SdkList)
-{
- $sdkProps = ConvertFrom-StringData (Get-Content "$sdk\source.properties" -Raw)
-
- $content = @"
-#### $($sdkProps.'Platform.Version') (API $($sdkProps.'AndroidVersion.ApiLevel'))
-
-_Location:_ $sdk
-
-"@
- Add-ContentToMarkdown -Content $content
-}
diff --git a/images/win/scripts/Installers/Validate-7zip.ps1 b/images/win/scripts/Installers/Validate-7zip.ps1
index c47c95a7..d29d394e 100644
--- a/images/win/scripts/Installers/Validate-7zip.ps1
+++ b/images/win/scripts/Installers/Validate-7zip.ps1
@@ -5,7 +5,7 @@
if (Get-Command -Name '7z')
{
- Write-Host "7zip on path"
+ Write-Host '7zip on path'
}
else
{
@@ -13,13 +13,3 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "7zip"
-$(7z --help).Split([System.Environment]::NewLine)[1] -match "\d+\.\d+"
-$7zipVersion = $matches[0]
-
-$Description = @"
-_Version:_ $7zipVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-AWS-SAM.ps1 b/images/win/scripts/Installers/Validate-AWS-SAM.ps1
index d953229d..ac18ab5d 100644
--- a/images/win/scripts/Installers/Validate-AWS-SAM.ps1
+++ b/images/win/scripts/Installers/Validate-AWS-SAM.ps1
@@ -3,25 +3,12 @@
## Desc: Validate aws sam cli
################################################################################
-$command = Get-Command -Name 'sam'
-
-if ($command)
+if (Get-Command -Name 'sam')
{
- Write-Host "AWS SAM CLI on path"
+ Write-Host 'AWS SAM CLI on path'
}
else
{
Write-Host 'AWS SAM CLI is not on path'
exit 1
}
-
-# Adding description of the software to Markdown
-$SoftwareName = "AWS SAM CLI"
-
-$version = (sam --version).Split(" ")[3]
-
-$Description = @"
-_Version:_ $version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Validate-AliyunCli.ps1 b/images/win/scripts/Installers/Validate-AliyunCli.ps1
index 2f72deca..cb3cad4d 100644
--- a/images/win/scripts/Installers/Validate-AliyunCli.ps1
+++ b/images/win/scripts/Installers/Validate-AliyunCli.ps1
@@ -5,20 +5,10 @@
if (Get-Command -Name 'aliyun')
{
- Write-Host "Alibaba Cloud CLI on path"
+ Write-Host 'Alibaba Cloud CLI on path'
}
else
{
Write-Host 'Alibaba Cloud CLI is not on path'
exit 1
}
-
-# Adding description of the software to Markdown
-$aliyun_version = ((aliyun --version | Select-String "Alibaba Cloud Command Line Interface Version ") -Split(" "))[6]
-
-$SoftwareName = "Alibaba Cloud CLI"
-$Description = @"
-_Version:_ $aliyun_version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Validate-AzureCli.ps1 b/images/win/scripts/Installers/Validate-AzureCli.ps1
index 231d112d..9c801f0b 100644
--- a/images/win/scripts/Installers/Validate-AzureCli.ps1
+++ b/images/win/scripts/Installers/Validate-AzureCli.ps1
@@ -3,7 +3,7 @@
## Desc: Validate Azure CLI
################################################################################
-if(Get-Command -Name 'az')
+if (Get-Command -Name 'az')
{
Write-Host "Azure Cli $(az --version) on path"
}
@@ -13,16 +13,3 @@ else
exit 1
}
-$azureCliVersion = az -v | findstr azure-cli
-$azureCliVersion = $azureCliVersion.trim().Substring("azure-cli".Length).trim()
-
-# Adding description of the software to Markdown
-$SoftwareName = "Azure CLI"
-
-$Description = @"
-_Version:_ $azureCliVersion
-_Environment:_
-* PATH: contains location of az.cmd
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-AzureCosmosDbEmulator.ps1 b/images/win/scripts/Installers/Validate-AzureCosmosDbEmulator.ps1
index 4020f40e..b2d8d4a3 100644
--- a/images/win/scripts/Installers/Validate-AzureCosmosDbEmulator.ps1
+++ b/images/win/scripts/Installers/Validate-AzureCosmosDbEmulator.ps1
@@ -33,15 +33,6 @@ if (!(Test-Path $exeFilePath))
Write-Host "$SoftwareName is not installed"
exit 1
}
-else
-{
- $fileVersion = (Get-Item $exeFilePath).VersionInfo.FileVersion
- Write-Host "$SoftwareName is successfully installed: $fileVersion"
- $Description = @"
-_Version:_ $fileVersion
-_Location:_ $installDir
-"@
-
- Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-}
+$fileVersion = (Get-Item $exeFilePath).VersionInfo.FileVersion
+Write-Host "$SoftwareName is successfully installed: $fileVersion"
diff --git a/images/win/scripts/Installers/Validate-AzureDevOpsCli.ps1 b/images/win/scripts/Installers/Validate-AzureDevOpsCli.ps1
index 4ec5e330..17a93491 100644
--- a/images/win/scripts/Installers/Validate-AzureDevOpsCli.ps1
+++ b/images/win/scripts/Installers/Validate-AzureDevOpsCli.ps1
@@ -5,7 +5,7 @@
az devops -h
-if($LastExitCode -ne 0)
+if ($LastExitCode -ne 0)
{
Write-Error "Azure DevOps Cli extension not present"
exit 1
@@ -15,10 +15,3 @@ else
Write-Host "Azure DevOps Cli extension is present"
}
-$azDevopsVer = az -v | findstr azure-devops
-
-$Description = @"
-_Version:_ $azDevopsVer
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName 'Azure DevOps Cli extension' -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-AzureModules.ps1 b/images/win/scripts/Installers/Validate-AzureModules.ps1
index 38c692b4..10190e0f 100644
--- a/images/win/scripts/Installers/Validate-AzureModules.ps1
+++ b/images/win/scripts/Installers/Validate-AzureModules.ps1
@@ -3,47 +3,6 @@
## Desc: Validate Azure PowerShell modules
################################################################################
-Import-Module -Name ImageHelpers -Force
-
-# Adding description of the software to Markdown
-function Add-ModuleDescription
-{
- param($DefaultModule, [String]$ModuleName)
-
- # Adding description of the software to Markdown
- $softwareName = "$moduleName PowerShell module"
-
- if ($defaultModule)
- {
- $description = "#### $($defaultModule.Version)`n`nThis version is installed and is available via ``Get-Module -ListAvailable``"
- }
- else
- {
- $Description = ""
- }
-
- Add-SoftwareDetailsToMarkdown -SoftwareName $softwareName -DescriptionMarkdown $description
- if($moduleName -eq 'Az')
- {
- $prop = @{n="Version";e={[Version]$_.Directory.Name}},@{n="Path";e={$_.FullName}}
- $azureModules = Get-ChildItem C:\Modules\az_*\Az\*\Az.psd1 | Select-Object $prop
- }
- else
- {
- $azureModules = Get-Module -Name $moduleName -ListAvailable | Sort-Object Version -Unique
- }
-
- foreach($module in $azureModules)
- {
- if($module.Version -ne $defaultModule.Version)
- {
-
- $currentModule = "#### $($module.Version)`n`nThis version is saved but not installed`n_Location:_ $($module.Path)"
- Add-ContentToMarkdown -Content $currentModule
- }
- }
-}
-
function Validate-AzureModule
{
param([String]$ModuleName, [String[]]$ModuleVersions)
@@ -82,15 +41,3 @@ Validate-AzureModule -ModuleName Azure -ModuleVersions $azureVersions
$azVersions = "1.0.0", "1.6.0", "2.3.2", "2.6.0", "3.1.0", "3.5.0", "3.8.0"
Validate-AzureModule -ModuleName Az -ModuleVersions $azVersions
-
-# Get default modules version
-$defaultAzureRMModule = Get-Module -Name AzureRM -ListAvailable
-$defaultAzureModule = Get-Module -Name Azure -ListAvailable
-
-# Add modules to the PSModulePath
-$env:PSModulePath = $env:PSModulePath + ";C:\Modules"
-
-# Adding description of the software to Markdown
-Add-ModuleDescription -DefaultModule $defaultAzureRMModule -ModuleName AzureRM
-Add-ModuleDescription -DefaultModule $defaultAzureModule -ModuleName Azure
-Add-ModuleDescription -ModuleName Az
diff --git a/images/win/scripts/Installers/Validate-Bazel.ps1 b/images/win/scripts/Installers/Validate-Bazel.ps1
index 1728a9a6..20d3d768 100644
--- a/images/win/scripts/Installers/Validate-Bazel.ps1
+++ b/images/win/scripts/Installers/Validate-Bazel.ps1
@@ -5,7 +5,7 @@
if (Get-Command -Name 'bazel')
{
- Write-Host "bazel on path"
+ Write-Host 'bazel on path'
}
else
{
@@ -15,7 +15,7 @@ else
if (Get-Command -Name 'bazelisk')
{
- Write-Host "bazelisk on path"
+ Write-Host 'bazelisk on path'
}
else
{
@@ -23,22 +23,4 @@ else
exit 1
}
-# Adding description of Bazel to Markdown
-$SoftwareName = "bazel"
-$Description = @"
-_Version:_ $(bazel --version)
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-# Adding description of Bazelisk to Markdown
-$bazelisk_version = ((bazelisk version | Select-String "Bazelisk version:") -Split(" v"))[2]
-
-$SoftwareName = "bazelisk"
-
-$Description = @"
-_Version:_ $bazelisk_version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Boost.ps1 b/images/win/scripts/Installers/Validate-Boost.ps1
index 97464b77..83bf3d08 100644
--- a/images/win/scripts/Installers/Validate-Boost.ps1
+++ b/images/win/scripts/Installers/Validate-Boost.ps1
@@ -25,50 +25,15 @@ function Validate-BoostVersion
exit 1
}
-# Adding description of the software to Markdown
-$tmplMark = @"
-#### {0} [{2}]
-
-_Environment:_
-* {1}: root directory of the Boost version {0} installation
-
-"@
-
-$Description = New-Object System.Text.StringBuilder
$SoftwareName = 'Boost'
$BoostRootDirectory = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath $SoftwareName
$BoostTools = Get-ToolsByName -SoftwareName $SoftwareName
foreach ($BoostTool in $BoostTools)
{
- $BoostToolsetName = $BoostTool.Architecture
$BoostVersionsToInstall = $BoostTool.Versions | Foreach-Object {"{0}.0" -f $_}
foreach($BoostVersion in $BoostVersionsToInstall)
{
Validate-BoostVersion -BoostRootPath $BoostRootDirectory -BoostRelease $BoostVersion
- $BoostVersionTag = "BOOST_ROOT_{0}" -f $BoostVersion.Replace('.', '_')
-
- $null = $Description.AppendLine(($tmplMark -f $BoostVersion, $BoostVersionTag, $BoostToolsetName))
}
}
-
-$CMakeFindBoostInfo = @"
-
-#### _Notes:_
-
-> ``BOOST_ROOT`` is not set on images but it is required by CMake. Please make sure you set this variable
-> value to either ``BOOST_ROOT_1_69_0`` or ``BOOST_ROOT_1_72_0`` depending on the Boost version you are using.
-
-Link: https://cmake.org/cmake/help/latest/module/FindBoost.html
-
-If Boost was built using the ``boost-cmake`` project or from ``Boost 1.70.0`` on it provides a package
-configuration file for use with find\_package's config mode. This module looks for the package
-configuration file called BoostConfig.cmake or boost-config.cmake and stores the result in CACHE entry "Boost_DIR".
-If found, the package configuration file is loaded and this module returns with no further action.
-See documentation of the Boost CMake package configuration for details on what it provides.
-
-Set ``Boost_NO_BOOST_CMAKE to ON``, to disable the search for boost-cmake.
-"@
-
-$null = $Description.AppendLine($CMakeFindBoostInfo)
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description.ToString()
diff --git a/images/win/scripts/Installers/Validate-Chrome.ps1 b/images/win/scripts/Installers/Validate-Chrome.ps1
index e27c5c9b..0f94190b 100644
--- a/images/win/scripts/Installers/Validate-Chrome.ps1
+++ b/images/win/scripts/Installers/Validate-Chrome.ps1
@@ -3,23 +3,12 @@
## Desc: Validate Google Chrome installation.
################################################################################
-if(Test-Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe")
+if (Test-Path 'HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe')
{
- (Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo
-
- $SoftwareName = "Google Chrome"
- $fileVersion = (Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo.FileVersion
- $Description = @"
-_version:_
-$fileVersion
-"@
-
- Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
- exit 0
+ (Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)').VersionInfo
}
else
{
- Write-Host "Google Chrome is not installed."
+ Write-Host 'Google Chrome is not installed.'
exit 1
}
diff --git a/images/win/scripts/Installers/Validate-CloudFoundryCli.ps1 b/images/win/scripts/Installers/Validate-CloudFoundryCli.ps1
index 087ffc84..69928a46 100644
--- a/images/win/scripts/Installers/Validate-CloudFoundryCli.ps1
+++ b/images/win/scripts/Installers/Validate-CloudFoundryCli.ps1
@@ -5,7 +5,7 @@
if (Get-Command -Name 'cf')
{
- Write-Host "cf on path"
+ Write-Host 'cf on path'
}
else
{
@@ -13,16 +13,3 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "Cloud Foundry CLI"
-
-if( $(cf version) -match '\d+\.\d+\.\d+' )
-{
- $version = $Matches[0]
-}
-
-$Description = @"
-_Version:_ $version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Cmake.ps1 b/images/win/scripts/Installers/Validate-Cmake.ps1
index bacd0d2f..df683591 100644
--- a/images/win/scripts/Installers/Validate-Cmake.ps1
+++ b/images/win/scripts/Installers/Validate-Cmake.ps1
@@ -9,23 +9,8 @@ if(Get-Command -Name 'cmake')
}
else
{
- Write-Host 'CMake not on path'
+ Write-Host "CMake not on path"
exit 1
}
-if( $( $(cmake -version) | Out-String) -match 'cmake version (?.*).*' )
-{
- $cmakeVersion = $Matches.version.Trim()
-}
-
-# Adding description of the software to Markdown
-$SoftwareName = "CMake"
-
-$Description = @"
-_Version:_ $cmakeVersion
-_Environment:_
-* PATH: contains location of cmake.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-DACFx.ps1 b/images/win/scripts/Installers/Validate-DACFx.ps1
index c7def3ef..3dd18a1c 100644
--- a/images/win/scripts/Installers/Validate-DACFx.ps1
+++ b/images/win/scripts/Installers/Validate-DACFx.ps1
@@ -5,9 +5,8 @@
$env:PATH = $env:Path + ';C:\Program Files\Microsoft SQL Server\120\DAC\bin;C:\Program Files\Microsoft SQL Server\130\DAC\bin;C:\Program Files\Microsoft SQL Server\140\DAC\bin;C:\Program Files\Microsoft SQL Server\150\DAC\bin'
-if(Get-Command -Name 'SqlPackage')
+if (Get-Command -Name 'SqlPackage')
{
-
Write-Host "DACFx is installed at path" (Get-Command -Name 'SqlPackage').Source
}
else
@@ -15,29 +14,11 @@ else
throw "DACFx is not installed!"
}
-if(Get-Command -Name 'SqlLocalDB')
+if (Get-Command -Name 'SqlLocalDB')
{
- $localDbPath = (Get-Command -Name 'SqlLocalDB').Source
+ Write-Host "SQL Server Express LocalDB is available at " (Get-Command -Name SqlLocalDB).Source
}
else
{
throw "SqlLocalDB is not installed!"
}
-
-function Get-DacFxVersion
-{
- $regKey = "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Data-Tier Application Framework\CurrentVersion"
- $Version = (Get-ItemProperty -Path $regKey).'(Default)'
- return $Version
-}
-
-
-# Adding description of the software to Markdown
-$SoftwareName = "SQL Server Data Tier Application Framework (x64)"
-
-$Description = @"
-_Version:_ $(Get-DacFxVersion)
-* SQL Server Express LocalDB is available at $localDbPath
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Docker.ps1 b/images/win/scripts/Installers/Validate-Docker.ps1
index 9dab4f46..e2b7571f 100644
--- a/images/win/scripts/Installers/Validate-Docker.ps1
+++ b/images/win/scripts/Installers/Validate-Docker.ps1
@@ -3,48 +3,17 @@
## Desc: Validate Docker.
################################################################################
-
-if((Get-Command -Name 'docker') -and (Get-Command -Name 'docker-compose'))
+if ((Get-Command -Name 'docker') -and (Get-Command -Name 'docker-compose'))
{
Write-Host "docker $(docker version) on path"
Write-Host "docker-compose $(docker-compose version) on path"
}
else
{
- Write-Host "docker or docker-compose are not on path"
+ Write-Host "docker or docker-compose are not on path"
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "Docker"
-
-$version = $(docker version --format '{{.Server.Version}}')
-
-$Description = @"
-_Version:_ $version
-_Environment:_
-* PATH: contains location of docker.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-
-
-$SoftwareName = "Docker-compose"
-
-if( $(docker-compose --version) -match 'docker-compose version (?.*), build.*' )
-{
- $dockerComposeVersion = $Matches.version
-}
-
-$Description = @"
-_Version:_ $dockerComposeVersion
-_Environment:_
-* PATH: contains location of docker-compose.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
# Validate helm
if (Get-Command -Name 'helm')
{
@@ -55,14 +24,3 @@ else
Write-Host 'helm is not on path'
exit 1
}
-
-$version = $(helm version --short)
-$SoftwareName = "Helm"
-
-$Description = @"
-_Version:_ $version
-_Environment:_
-* PATH: contains location of helm
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Validate-DotnetSDK.ps1 b/images/win/scripts/Installers/Validate-DotnetSDK.ps1
index cb5f917b..6d7c104a 100644
--- a/images/win/scripts/Installers/Validate-DotnetSDK.ps1
+++ b/images/win/scripts/Installers/Validate-DotnetSDK.ps1
@@ -3,7 +3,7 @@
## Desc: Validate dotnet
################################################################################
-if(Get-Command -Name 'dotnet')
+if (Get-Command -Name 'dotnet')
{
Write-Host "dotnet $(dotnet --version) on path"
}
@@ -13,34 +13,4 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = ".NET Core"
-
-$Description = @"
-The following runtimes and SDKs are installed:
-
-_Environment:_
-* PATH: contains location of dotnet.exe
-
-_SDK:_
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-$SdkList =(Get-ChildItem "C:\Program Files\dotnet\sdk") | Where { $_.Name -match "[0-9].*" } | Sort-Object -Descending | % { "* $($_.Name) $($_.FullName)" }
-
-Add-ContentToMarkdown -Content $SdkList
-
-
-
-$Runtimes = @"
-
-_Runtime:_
-"@
-
-Add-ContentToMarkdown -Content $Runtimes
-
-$RuntimeList =(Get-ChildItem "C:\Program Files\dotnet\shared\Microsoft.NETCore.App") | Where { $_.Name -match "[0-9].*" } | Sort-Object -Descending | % { "* $($_.Name) $($_.FullName)" }
-
-Add-ContentToMarkdown -Content $RuntimeList
diff --git a/images/win/scripts/Installers/Validate-DotnetTLS.ps1 b/images/win/scripts/Installers/Validate-DotnetTLS.ps1
index b94be5ce..0d17c7b0 100644
--- a/images/win/scripts/Installers/Validate-DotnetTLS.ps1
+++ b/images/win/scripts/Installers/Validate-DotnetTLS.ps1
@@ -5,24 +5,14 @@
$protocols = [Net.ServicePointManager]::SecurityProtocol
$protocolArr = $protocols -split ', '
-if($protocolArr.Contains('Tls12'))
+if ($protocolArr.Contains('Tls12'))
{
- Write-Host "Tls 1.2 has been enabled."
+ Write-Host 'Tls 1.2 has been enabled.'
}
else
{
- Write-Host "Tls 1.2 has not been enabled."
+ Write-Host 'Tls 1.2 has not been enabled.'
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "TLS12"
-$version = "1.2";
-
-$Description = @"
-_Version:_ $version
-_Description:_ .NET has been configured to use TLS 1.2 by default
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Edge.ps1 b/images/win/scripts/Installers/Validate-Edge.ps1
index 7ca51da5..2db17fb9 100644
--- a/images/win/scripts/Installers/Validate-Edge.ps1
+++ b/images/win/scripts/Installers/Validate-Edge.ps1
@@ -6,20 +6,10 @@
$RegistryKey = "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\msedge.exe"
if (Test-Path $RegistryKey)
{
- $SoftwareName = "Microsoft Edge"
- $VersionInfo = (Get-Item (Get-ItemProperty $RegistryKey).'(Default)').VersionInfo
- $VersionInfo
- $Description = @"
-_version:_
-$($VersionInfo.FileVersion)
-"@
-
- Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
- exit 0
+ (Get-Item (Get-ItemProperty $RegistryKey).'(Default)').VersionInfo
}
else
{
- Write-Host "Microsoft Edge is not installed."
- exit 1
+ Write-Host "Microsoft Edge is not installed."
+ exit 1
}
diff --git a/images/win/scripts/Installers/Validate-Firefox.ps1 b/images/win/scripts/Installers/Validate-Firefox.ps1
index f66b2c5f..1fa1852f 100644
--- a/images/win/scripts/Installers/Validate-Firefox.ps1
+++ b/images/win/scripts/Installers/Validate-Firefox.ps1
@@ -3,23 +3,12 @@
## Desc: Validate Mozilla Firefox installation.
################################################################################
-if(Test-Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe")
+if (Test-Path 'HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe')
{
- (Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe').'(Default)').VersionInfo
-
- $fileVersion = (Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe').'(Default)').VersionInfo.FileVersion
- $SoftwareName = "Mozilla Firefox"
- $Description = @"
-_version:_
-$fileVersion
-"@
-
- Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
- exit 0
+ (Get-Item (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe').'(Default)').VersionInfo
}
else
{
- Write-Host "Mozilla Firefox is not installed."
+ Write-Host 'Mozilla Firefox is not installed.'
exit 1
}
diff --git a/images/win/scripts/Installers/Validate-Git.ps1 b/images/win/scripts/Installers/Validate-Git.ps1
index 1927a6ad..c74239a5 100644
--- a/images/win/scripts/Installers/Validate-Git.ps1
+++ b/images/win/scripts/Installers/Validate-Git.ps1
@@ -12,51 +12,9 @@ function Test-CommandName {
exit 1
}
}
-function Test-Command {
- param(
- [parameter(Mandatory)][string] $CommandName,
- [parameter(Mandatory)][string] $CommandDescription,
- [parameter(Mandatory)][string] $VersionCmd,
- [parameter(Mandatory)][string] $regexVersion,
- [parameter(Mandatory)][string] $DescriptionMarkdown
- )
- Test-CommandName -CommandName $CommandName
-
- $strVersion = Invoke-Expression $VersionCmd
- Write-Host "$strVersion on path"
- if($strVersion -match $regexVersion) {
- $Version = $Matches.version
- }
- else {
- Write-Host "[!] $CommandName version detection failed"
- exit 1
- }
- # Adding description of the software to Markdown
- $DescriptionMarkdown = $DescriptionMarkdown -f $Version
- Add-SoftwareDetailsToMarkdown -SoftwareName $CommandDescription -DescriptionMarkdown $DescriptionMarkdown
-}
Test-CommandName -CommandName 'bash'
Test-CommandName -CommandName 'awk'
-
-$GitDescription = @"
-_Version:_ {0}
-_Environment:_
-* PATH: contains location of git.exe
-"@
-Test-Command -CommandName 'git' -CommandDescription 'Git' -VersionCmd "git version" -regexVersion 'git version (?.*).win.*' -DescriptionMarkdown $GitDescription
-
-$GitLfsDescription = @"
-_Version:_ {0}
-_Environment:_
-* PATH: contains location of git-lfs.exe
-* GIT_LFS_PATH: location of git-lfs.exe
-"@
-Test-Command -CommandName 'git-lfs' -CommandDescription 'Git Large File Storage (LFS)' -VersionCmd "git-lfs version" -regexVersion 'git-lfs\/(?.*) \(Git.*' -DescriptionMarkdown $GitLfsDescription
-
-$HubCliDescription = @"
-_Version:_ {0}
-_Environment:_
-* PATH: contains location of hub.exe
-"@
-Test-Command -CommandName 'hub' -CommandDescription 'Hub CLI' -VersionCmd "hub version | Select-String 'hub version'" -regexVersion 'hub version (?.*)' -DescriptionMarkdown $HubCliDescription
\ No newline at end of file
+Test-CommandName -CommandName 'git'
+Test-CommandName -CommandName 'git-lfs'
+Test-CommandName -CommandName 'hub'
diff --git a/images/win/scripts/Installers/Validate-GitHub-CLI.ps1 b/images/win/scripts/Installers/Validate-GitHub-CLI.ps1
index fa9f2bf1..39163139 100644
--- a/images/win/scripts/Installers/Validate-GitHub-CLI.ps1
+++ b/images/win/scripts/Installers/Validate-GitHub-CLI.ps1
@@ -3,25 +3,12 @@
## Desc: Validate GitHub CLI
################################################################################
-$command = Get-Command -Name 'gh'
-
-if ($command)
+if (Get-Command -Name 'gh')
{
- Write-Host "gh on path"
+ Write-Host 'gh on path'
}
else
{
Write-Host 'gh is not on path'
exit 1
}
-
-# Adding description of the software to Markdown
-$SoftwareName = "GitHub CLI"
-
-$version = (gh --version).Split()[2]
-
-$Description = @"
-_Version:_ $version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Validate-GitVersion.ps1 b/images/win/scripts/Installers/Validate-GitVersion.ps1
index 4b580c38..b315cda5 100644
--- a/images/win/scripts/Installers/Validate-GitVersion.ps1
+++ b/images/win/scripts/Installers/Validate-GitVersion.ps1
@@ -3,23 +3,12 @@
## Desc: Validate GitVersion
################################################################################
-$command = Get-Command -Name 'gitversion'
-if ($command)
+if (Get-Command -Name 'gitversion')
{
- Write-Host "gitversion on path"
+ Write-Host 'gitversion on path'
}
else
{
Write-Host 'gitversion is not on path'
exit 1
}
-
-# Adding description of the software to Markdown
-$SoftwareName = "GitVersion"
-$version = $command.Version.ToString()
-
-$Description = @"
-_Version:_ $version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Go.ps1 b/images/win/scripts/Installers/Validate-Go.ps1
index 4c88cc1d..4e8c0a1b 100644
--- a/images/win/scripts/Installers/Validate-Go.ps1
+++ b/images/win/scripts/Installers/Validate-Go.ps1
@@ -25,8 +25,6 @@ function Get-GoVersion
{
$goFullVersion = $Matches.version
Write-Host "$goFullVersion has been found"
-
- return $goFullVersion
}
else
{
@@ -46,38 +44,7 @@ else
exit 1
}
-# Add details of available versions in Markdown
-$tmplMark = @"
-#### {0}
-
-_Environment:_
-* {1}: root directory of the Go {0} installation
-
-"@
-
-$tmplMarkRoot = @"
-#### {0}
-
-_Environment:_
-* PATH: contains the location of go.exe version {0}
-* GOROOT: root directory of the Go {0} installation
-* {1}: root directory of the Go {0} installation
-"@
-
-$SoftwareName = "Go (x64)"
-$Description = New-Object System.Text.StringBuilder
$goVersionsToInstall = $env:GO_VERSIONS.split(", ", [System.StringSplitOptions]::RemoveEmptyEntries)
-
foreach($go in $goVersionsToInstall) {
- $goVersion = Get-GoVersion -goVersion $go
- $goVersionTag = "GOROOT_{0}_{1}_X64" -f $go.split(".")
- if ($goVersion -eq $go) {
- if($go -eq $env:GO_DEFAULT) {
- $null = $Description.AppendLine(($tmplMarkRoot -f $goVersion, $goVersionTag))
- } else {
- $null = $Description.AppendLine(($tmplMark -f $goVersion, $goVersionTag))
- }
- }
+ Get-GoVersion -goVersion $go
}
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description.ToString()
diff --git a/images/win/scripts/Installers/Validate-Haskell.ps1 b/images/win/scripts/Installers/Validate-Haskell.ps1
index 6d47daad..f64c7536 100644
--- a/images/win/scripts/Installers/Validate-Haskell.ps1
+++ b/images/win/scripts/Installers/Validate-Haskell.ps1
@@ -14,8 +14,6 @@ else
exit 1
}
-$SoftwareName = "ghc"
-[String] $DefaultGhcVersion = & ghc --version
$ChocoPackagesPath = Join-Path $env:ChocolateyInstall "lib"
[Array] $GhcVersionList = Get-ChildItem -Path $ChocoPackagesPath -Filter "ghc.*" | ForEach-Object { $_.Name.TrimStart("ghc.") }
@@ -31,7 +29,8 @@ else
}
# Validation each of GHC version
-ForEach ($version in $GhcVersionList) {
+foreach ($version in $GhcVersionList)
+{
$BinGhcPath = Join-Path $env:ChocolateyInstall "lib\ghc.$version\tools\ghc-$version\bin\ghc.exe"
if ((& $BinGhcPath --version) -match $version)
{
@@ -44,20 +43,6 @@ ForEach ($version in $GhcVersionList) {
}
}
-
-$GhcVersionsDescription = $GhcVersionList | ForEach-Object {
- $DefaultPostfix = if ($DefaultGhcVersion -match $_) { " (default)" } else { "" }
- "ghc $_ $DefaultPostfix `n"
-}
-
-$Description = @"
-_Version:_
-$GhcVersionsDescription
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-
# Cabal validation
if (Get-Command -Name 'cabal')
{
@@ -68,11 +53,3 @@ else
Write-Host "cabal is not on path."
exit 1
}
-
-$SoftwareName = "cabal"
-
-$Description = @"
-_Version:_ $(cabal --version)
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Validate-InnoSetup.ps1 b/images/win/scripts/Installers/Validate-InnoSetup.ps1
index 30f28ede..21c55119 100644
--- a/images/win/scripts/Installers/Validate-InnoSetup.ps1
+++ b/images/win/scripts/Installers/Validate-InnoSetup.ps1
@@ -5,23 +5,11 @@
if (Get-Command -Name 'iscc')
{
- Write-Host "iscc is on PATH"
+ Write-Host 'iscc is on PATH'
}
else
{
- Write-Host "iscc is not on PATH"
+ Write-Host 'iscc is not on PATH'
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "Inno Setup"
-
-$ChocoList = $(choco list --local-only innosetup) | Select-String -Pattern "InnoSetup"
-$ChocoList -Match "\d+\.\d+\.\d+"
-$Version = $Matches[0]
-
-$Description = @"
-_Version:_ $Version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-JavaTools.ps1 b/images/win/scripts/Installers/Validate-JavaTools.ps1
index 7530bf89..67d1af23 100644
--- a/images/win/scripts/Installers/Validate-JavaTools.ps1
+++ b/images/win/scripts/Installers/Validate-JavaTools.ps1
@@ -40,7 +40,6 @@ Function Validate-JavaVersion {
Write-Host "Java $javaVersion found"
# Reset Path to the default one in case we need to check the default Java later
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
- return $javaVersion
}
else
{
@@ -63,87 +62,7 @@ else
}
Write-Host "Checking installed Java versions"
-
-$java7Version = Validate-JavaVersion -Version "1.7"
-$java8Version = Validate-JavaVersion -Version "1.8" -Default
-$java11Version = Validate-JavaVersion -Version "11"
-$java13Version = Validate-JavaVersion -Version "13"
-
-if( $(ant -version) -match 'Apache Ant\(TM\) version (?.*) compiled.*' )
-{
- $antVersion = $Matches.version
-}
-
-if( $( $(mvn -version) | Out-String) -match 'Apache Maven (?.*) \(.*' )
-{
- $mvnVersion = $Matches.version
-}
-
-if( $( $(gradle -version) | Out-String) -match 'Gradle (?.*)' )
-{
- $gradleVersion = $Matches.version.Trim()
-}
-
-# Adding description of the software to Markdown
-$SoftwareName = "Java Development Kit"
-
-$Description = @"
-#### $java8Version (default)
-
-_Environment:_
-* JAVA_HOME: location of JDK
-* PATH: contains bin folder of JDK
-
-#### $java7Version
-
-_Location:_ $env:JAVA_HOME_7_X64
-
-#### $java11Version
-
-_Location:_ $env:JAVA_HOME_11_X64
-
-#### $java13Version
-
-_Location:_ $env:JAVA_HOME_13_X64
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-
-# Adding description of the software to Markdown
-$SoftwareName = "Ant"
-
-$Description = @"
-_Version:_ $antVersion
-_Environment:_
-* PATH: contains location of ant.cmd
-* ANT_HOME: location of ant.cmd
-* COBERTURA_HOME: location of cobertura-2.1.1.jar
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-
-# Adding description of the software to Markdown
-$SoftwareName = "Maven"
-
-$Description = @"
-_Version:_ $mvnVersion
-_Environment:_
-* PATH: contains location of mvn.bat
-* M2_HOME: Maven installation root
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-
-# Adding description of the software to Markdown
-$SoftwareName = "Gradle"
-
-$Description = @"
-_Version:_ $gradleVersion
-_Environment:_
-* PATH: contains location of gradle
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
+Validate-JavaVersion -Version "1.7"
+Validate-JavaVersion -Version "1.8" -Default
+Validate-JavaVersion -Version "11"
+Validate-JavaVersion -Version "13"
diff --git a/images/win/scripts/Installers/Validate-Jq.ps1 b/images/win/scripts/Installers/Validate-Jq.ps1
index b61ddae8..67b4275f 100644
--- a/images/win/scripts/Installers/Validate-Jq.ps1
+++ b/images/win/scripts/Installers/Validate-Jq.ps1
@@ -5,7 +5,7 @@
if (Get-Command -Name 'jq')
{
- Write-Host "jq on path"
+ Write-Host 'jq on path'
}
else
{
@@ -13,11 +13,3 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "jq"
-
-$Description = @"
-_Version:_ $(jq --version)
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Julia.ps1 b/images/win/scripts/Installers/Validate-Julia.ps1
index 41f9310a..94d02cfc 100644
--- a/images/win/scripts/Installers/Validate-Julia.ps1
+++ b/images/win/scripts/Installers/Validate-Julia.ps1
@@ -4,7 +4,7 @@
################################################################################
# Verify that julia.exe is on the path
-if((Get-Command -Name 'julia') -and (Test-Path -Path 'C:\Julia'))
+if ((Get-Command -Name 'julia') -and (Test-Path -Path 'C:\Julia'))
{
Write-Host "$(julia --version) is on the path."
}
@@ -14,12 +14,3 @@ else
exit 1
}
-# Add description of the software to Markdown
-$SoftwareName = "Julia (x64)"
-$juliaVersion = $(julia --version).split() -match "\d+\.\d+\.\d+"
-
-$Description = @"
-_Version:_ $juliaVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Kind.ps1 b/images/win/scripts/Installers/Validate-Kind.ps1
index 9dd12861..9147f462 100644
--- a/images/win/scripts/Installers/Validate-Kind.ps1
+++ b/images/win/scripts/Installers/Validate-Kind.ps1
@@ -3,8 +3,7 @@
## Desc: Validate Kind.
################################################################################
-
-if((Get-Command -Name 'kind'))
+if (Get-Command -Name 'kind')
{
Write-Host "kind $(kind version) in path"
}
@@ -13,16 +12,3 @@ else
Write-Host "kind is not in path"
exit 1
}
-
-# Adding description of the software to Markdown
-$SoftwareName = "Kind"
-
-$version = $(kind version)
-
-$Description = @"
-_Version:_ $version
-_Environment:_
-* PATH: contains location of kind.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-KubernetesCli.ps1 b/images/win/scripts/Installers/Validate-KubernetesCli.ps1
index 5b3d768b..a51cbac6 100644
--- a/images/win/scripts/Installers/Validate-KubernetesCli.ps1
+++ b/images/win/scripts/Installers/Validate-KubernetesCli.ps1
@@ -3,8 +3,7 @@
## Desc: Validate KubernetesCli.
################################################################################
-
-if((Get-Command -Name 'kubectl'))
+if (Get-Command -Name 'kubectl')
{
Write-Host "kubectl $(kubectl version --client=true --short=true) in path"
}
@@ -14,20 +13,7 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "Kubectl"
-
-$version = $(kubectl version --client=true --short=true)
-
-$Description = @"
-_Version:_ $version
-_Environment:_
-* PATH: contains location of kubectl.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-if((Get-Command -Name 'minikube'))
+if (Get-Command -Name 'minikube')
{
Write-Host "minikube $(minikube version --short) in path"
}
@@ -37,15 +23,3 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "minikube"
-
-$version = $(minikube version --short=true)
-
-$Description = @"
-_Version:_ $version
-_Environment:_
-* PATH: contains location of minikube.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Mercurial.ps1 b/images/win/scripts/Installers/Validate-Mercurial.ps1
index 74299f06..d42189b8 100644
--- a/images/win/scripts/Installers/Validate-Mercurial.ps1
+++ b/images/win/scripts/Installers/Validate-Mercurial.ps1
@@ -5,21 +5,10 @@
if (Get-Command -Name 'hg')
{
- Write-Host "Mercurial on path"
+ Write-Host 'Mercurial on path'
}
else
{
Write-Host 'Mercurial is not on path'
exit 1
}
-
-# Adding description of the software to Markdown
-$SoftwareName = "Mercurial"
-$(hg --version).Split([System.Environment]::NewLine)[0] -match "\d+\.\d+"
-$MercurialVersion = $matches[0]
-
-$Description = @"
-_Version:_ $MercurialVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Mingw64.ps1 b/images/win/scripts/Installers/Validate-Mingw64.ps1
index 080a9797..eb097ae7 100644
--- a/images/win/scripts/Installers/Validate-Mingw64.ps1
+++ b/images/win/scripts/Installers/Validate-Mingw64.ps1
@@ -35,23 +35,3 @@ else
Write-Host "make is not on PATH"
exit 1
}
-
-# Adding description of the software to Markdown
-
-# `gcc --version` gives output like:
-# gcc.exe (x86_64-posix-seh-rev0, Built by Mingw-w64 project) 5.3.0
-# Copyright (C) 2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-$SoftwareName = "Mingw-w64"
-$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$"
-$mingw64Version = $matches[0]
-
-$Description = @"
-_Version:_ $mingw64Version
-_Environment:_
-* PATH: contains location of the Mingw-w64 'bin' directory
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Miniconda.ps1 b/images/win/scripts/Installers/Validate-Miniconda.ps1
index ca48b40f..0c83f36f 100644
--- a/images/win/scripts/Installers/Validate-Miniconda.ps1
+++ b/images/win/scripts/Installers/Validate-Miniconda.ps1
@@ -25,12 +25,3 @@ else
exit 1
}
-$softwareName = "Miniconda"
-$description = @"
-_Version:_ $(& "$env:CONDA\Scripts\conda.exe" --version)
-_Environment:_
-* CONDA: contains location of the root of the Miniconda installation
-"@
-
-# Adding description of the software to Markdown
-Add-SoftwareDetailsToMarkdown -SoftwareName $softwareName -DescriptionMarkdown $description
diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1
index d1749c5d..efb4160c 100644
--- a/images/win/scripts/Installers/Validate-Msys2.ps1
+++ b/images/win/scripts/Installers/Validate-Msys2.ps1
@@ -41,35 +41,3 @@ $installedMinGWTools | ForEach-Object {
}
}
-# Adding description of the software to Markdown
-
-function Get-ToolVersion {
- param(
- [string] $ToolPath,
- [int] $VersionLineNumber
- )
-
- $toolRawVersion = Invoke-Expression "$ToolPath --version"
- $toolRawVersion.Split([System.Environment]::NewLine)[$VersionLineNumber] -match "\d+\.\d+(\.\d+)?" | Out-Null
- $toolVersion = $matches[0]
- return $toolVersion
-}
-
-$SoftwareName = "MSYS2"
-$pacmanVersion = Get-ToolVersion -ToolPath "$msys2BinDir/pacman" -VersionLineNumber 1
-$bashVersion = Get-ToolVersion -ToolPath "$msys2BinDir/bash" -VersionLineNumber 0
-$gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -VersionLineNumber 0
-$tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -VersionLineNumber 0
-
-$Description = @"
-> _Note:_ MSYS2 is pre-installed on image but not added to PATH.
-
-_Tool versions_
-_pacman:_ $pacmanVersion
-_bash:_ $bashVersion
-_gcc:_ $gccVersion
-_tar:_ $tarVersion
-MSYS2 location: C:\msys64
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-MysqlCli.ps1 b/images/win/scripts/Installers/Validate-MysqlCli.ps1
index f056bee8..a88bbfd2 100644
--- a/images/win/scripts/Installers/Validate-MysqlCli.ps1
+++ b/images/win/scripts/Installers/Validate-MysqlCli.ps1
@@ -3,10 +3,9 @@
## Desc: Validate Mysql Cli
################################################################################
-$command = Get-Command -Name 'mysql'
-if($command)
+if (Get-Command -Name 'mysql')
{
- Write-Host "Mysql is on path"
+ Write-Host 'Mysql is on path'
}
else
{
@@ -14,14 +13,3 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "Mysql"
-$version = $command.Version.ToString();
-
-$Description = @"
-_Version:_ $version
-_Environment:_
-* PATH: contains location of mysql.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-NET472.ps1 b/images/win/scripts/Installers/Validate-NET472.ps1
index fb791a4a..0299304f 100644
--- a/images/win/scripts/Installers/Validate-NET472.ps1
+++ b/images/win/scripts/Installers/Validate-NET472.ps1
@@ -3,25 +3,15 @@
## Desc: Validate .NET 4.7.2
################################################################################
-Import-Module -Name ImageHelpers -Force
-
# For reference, visit https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#ps_a
-if(Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Release | ForEach-Object { $_ -ge 461814 })
+if (Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Release | ForEach-Object { $_ -ge 461814 })
{
$version = Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Version
- Write-Host "Installed .Net version " $version
+ Write-Host "Installed .Net version $version"
}
-else {
+else
+{
Write-Host ".Net 472 not found"
exit 1
}
-
-# Adding description of the software to Markdown
-$SoftwareName = ".NET 4.7.2"
-
-$Description = @"
-_Version:_ $version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-NET48.ps1 b/images/win/scripts/Installers/Validate-NET48.ps1
index a0b43c1c..1c1c974a 100644
--- a/images/win/scripts/Installers/Validate-NET48.ps1
+++ b/images/win/scripts/Installers/Validate-NET48.ps1
@@ -3,26 +3,14 @@
## Desc: Validate .NET 4.8
################################################################################
-Import-Module -Name ImageHelpers -Force
-
# For reference, visit https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#ps_a
-if(Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Release | ForEach-Object { $_ -ge 528049 })
+if (Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Release | ForEach-Object { $_ -ge 528049 })
{
$version = Get-ChildItem "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" | Get-ItemPropertyValue -Name Version
- Write-Host "Installed .Net version " $version
+ Write-Host "Installed .Net version $version"
}
-else {
+else
+{
Write-Host ".Net 48 not found"
exit 1
}
-
-
-# Adding description of the software to Markdown
-$SoftwareName = ".NET 4.8"
-
-$Description = @"
-_Version:_ $version
-_Path:_ ${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-NSIS.ps1 b/images/win/scripts/Installers/Validate-NSIS.ps1
index 276eb139..04b54dcc 100644
--- a/images/win/scripts/Installers/Validate-NSIS.ps1
+++ b/images/win/scripts/Installers/Validate-NSIS.ps1
@@ -5,7 +5,7 @@
$SoftwareName = 'Nullsoft Install System (NSIS)'
-if (Get-Command -Name makensis)
+if (Get-Command -Name 'makensis')
{
Write-Host "$SoftwareName is installed"
}
@@ -15,17 +15,3 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$ChocoList = $(choco list --local-only nsis) | Select-String -Pattern "nsis" | Select-Object -First 1
-
-if ($ChocoList -Match "\d+\.\d+")
-{
- $Version = $Matches[0]
-}
-
-
-$Description = @"
-_Version:_ $Version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-NodeLts.ps1 b/images/win/scripts/Installers/Validate-NodeLts.ps1
index 7d42a040..201a86b3 100644
--- a/images/win/scripts/Installers/Validate-NodeLts.ps1
+++ b/images/win/scripts/Installers/Validate-NodeLts.ps1
@@ -3,7 +3,7 @@
## Desc: Validate nodejs-lts and other common node tools.
################################################################################
-if((Get-Command -Name 'node') -and (Get-Command -Name 'npm'))
+if ((Get-Command -Name 'node') -and (Get-Command -Name 'npm'))
{
Write-Host "Node $(node --version) on path"
Write-Host "Npm $(npm -version) on path"
@@ -14,7 +14,7 @@ else
exit 1
}
-if((Get-Command -Name 'gulp') -and (Get-Command -Name 'grunt') -and (Get-Command -Name 'cordova') -and (Get-Command -Name 'yarn'))
+if ((Get-Command -Name 'gulp') -and (Get-Command -Name 'grunt') -and (Get-Command -Name 'cordova') -and (Get-Command -Name 'yarn'))
{
Write-Host "Gulp $(gulp -version) on path"
Write-Host "Grunt $(grunt -version) on path"
@@ -26,7 +26,7 @@ else
exit 1
}
-if(Get-Command -Name 'lerna')
+if (Get-Command -Name 'lerna')
{
Write-Host "lerna $(lerna --version) on path"
}
@@ -35,43 +35,3 @@ else
Write-Host "lerna is not on path"
exit 1
}
-
-
-
-if( $(node --version) -match 'v(?.*)' )
-{
- $nodeVersion = $Matches.version
- $nodeArch = $(node -e "console.log(process.arch)")
-}
-
-$npmVersion = $(npm -version)
-
-# Adding description of the software to Markdown
-$SoftwareName = "Node.js"
-$GulpInfo = "Gulp $(gulp -version)"
-$GruntInfo = "Grunt $(grunt -version)"
-$YarnInfo = "Yarn $(yarn -version)"
-
-$Description = @"
-_Version:_ $nodeVersion
-_Architecture:_ $nodeArch
-_Environment:_
-* PATH: contains location of node.exe
-* $GulpInfo
-* $GruntInfo
-* $YarnInfo
-
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-# Adding description of the software to Markdown
-$SoftwareName = "npm"
-
-$Description = @"
-_Version:_ $npmVersion
-_Environment:_
-* PATH: contains location of npm.cmd
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-OpenSSL.ps1 b/images/win/scripts/Installers/Validate-OpenSSL.ps1
index 12791491..6ec079be 100644
--- a/images/win/scripts/Installers/Validate-OpenSSL.ps1
+++ b/images/win/scripts/Installers/Validate-OpenSSL.ps1
@@ -5,7 +5,7 @@
if (Get-Command -Name 'openssl')
{
- Write-Host "openssl on path"
+ Write-Host 'openssl on path'
}
else
{
@@ -13,17 +13,3 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "OpenSSL"
-
-$versions = Get-Command openssl -All
-foreach ($version in $versions)
-{
- $command = "& `"$($version.Source)`" version"
- if ( $(Invoke-Expression -Command $command) -match '\d+\.\d+\.\d+\w?' )
- {
- $Description += "_Version:_ $($Matches[0]) at $($version.Source)
"
- }
-}
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-PHP.ps1 b/images/win/scripts/Installers/Validate-PHP.ps1
index f2f26a52..0c50e7e2 100644
--- a/images/win/scripts/Installers/Validate-PHP.ps1
+++ b/images/win/scripts/Installers/Validate-PHP.ps1
@@ -15,7 +15,8 @@ function Get-PHPVersion
if($($(php --version)| Out-String) -match 'PHP (?.*) (.*cli).*')
{
$phpVersion = $Matches.version
- return $phpVersion
+ Write-Host "PHP version at $phpRootPath is $phpVersion"
+ exit 0
}
Write-Host "Unable to determine PHP version at " + $phpRootPath
@@ -44,32 +45,5 @@ else
exit 1
}
-# Get the composer version.
-$composerVersion = $(composer --version)
-
-# Add composer version details in Markdown
-$SoftwareName = "Composer"
-$Description = @"
-#### $composerVersion
-
-_Environment:_
-* PATH: contains the location of composer.exe version $composerVersion
-* PHPROOT: root directory of the Composer $composerVersion installation
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
# Get available versions of PHP
-$phpVersionOnPath = Get-PHPVersion -phpRootPath "C:\tools\php72"
-
-# Add details of available versions in Markdown
-$SoftwareName = "PHP (x64)"
-$Description = @"
-#### $phpVersionOnPath
-
-_Environment:_
-* PATH: contains the location of php.exe version $phpVersionOnPath
-* PHPROOT: root directory of the PHP $phpVersionOnPath installation
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
+Get-PHPVersion -phpRootPath "C:\tools\php72"
diff --git a/images/win/scripts/Installers/Validate-Packer.ps1 b/images/win/scripts/Installers/Validate-Packer.ps1
index 85473557..c1333d1e 100644
--- a/images/win/scripts/Installers/Validate-Packer.ps1
+++ b/images/win/scripts/Installers/Validate-Packer.ps1
@@ -5,7 +5,7 @@
if (Get-Command -Name 'packer')
{
- Write-Host "Packer is on path"
+ Write-Host 'Packer is on path'
}
else
{
@@ -13,12 +13,3 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "Packer"
-$PackerVersion = packer --version
-
-$Description = @"
-_Version:_ $PackerVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Perl.ps1 b/images/win/scripts/Installers/Validate-Perl.ps1
index 6c0abc26..09ada6ab 100644
--- a/images/win/scripts/Installers/Validate-Perl.ps1
+++ b/images/win/scripts/Installers/Validate-Perl.ps1
@@ -5,7 +5,7 @@
if (Get-Command -Name 'perl')
{
- Write-Host "perl on path"
+ Write-Host 'perl on path'
}
else
{
@@ -13,11 +13,3 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "Perl"
-
-$Description = @"
-_Version:_ $(perl -e 'print $^V')
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-PowershellCore.ps1 b/images/win/scripts/Installers/Validate-PowershellCore.ps1
index 1501ba87..b21a4064 100644
--- a/images/win/scripts/Installers/Validate-PowershellCore.ps1
+++ b/images/win/scripts/Installers/Validate-PowershellCore.ps1
@@ -5,24 +5,11 @@
if (Get-Command -Name 'pwsh')
{
- Write-Host "pwsh is on PATH"
+ Write-Host 'pwsh is on PATH'
}
else
{
- Write-Host "pwsh is not on PATH"
+ Write-Host 'pwsh is not on PATH'
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "Powershell Core"
-
-if(($(pwsh --version) | Out-String) -match 'PowerShell (?.*)')
-{
- $PowershellVersion = $Matches.version
-}
-
-$Description = @"
-_Version:_ $PowershellVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Rust.ps1 b/images/win/scripts/Installers/Validate-Rust.ps1
index d23d91d8..116f33cf 100644
--- a/images/win/scripts/Installers/Validate-Rust.ps1
+++ b/images/win/scripts/Installers/Validate-Rust.ps1
@@ -17,18 +17,3 @@ else
Write-Host "rustc is not on the path"
exit 1
}
-
-$RustPath = Split-Path (Get-Command -Name 'rustc').Path
-$RustcVersion -Match "\d+\.\d+\.\d+" | Out-Null
-$Version = $Matches[0]
-
-# Adding description of the software to Markdown
-$SoftwareName = "Rust (64-bit)"
-$Description = @"
-#### $Version
-_Environment:_
-* _Location:_ $RustPath
-* PATH: contains the location of rustc.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-SQLExpress.ps1 b/images/win/scripts/Installers/Validate-SQLExpress.ps1
index 2cb7f4f3..c1f32eca 100644
--- a/images/win/scripts/Installers/Validate-SQLExpress.ps1
+++ b/images/win/scripts/Installers/Validate-SQLExpress.ps1
@@ -25,8 +25,6 @@ function Test-SqlConnection {
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString
$sqlConnection.Open()
Write-Host -Object "Connection to SQL Express was successful."
- return $sqlConnection.ServerVersion
-
} catch {
Write-Host -Object "Connection to SQL Express cannot be established."
exit 1
@@ -36,17 +34,7 @@ function Test-SqlConnection {
$sqlConnection.Close()
}
}
+
$instanceName = "$env:computername\$sqlInstance"
-$version = Test-SqlConnection -ServerName $instanceName -IntegratedSecurity "false" -UserName $sqlUser -Password $sqlPassword
+Test-SqlConnection -ServerName $instanceName -IntegratedSecurity "false" -UserName $sqlUser -Password $sqlPassword
-# Adding description of the software to Markdown
-$SoftwareName = "Microsoft SQL Express"
-$Description = @"
-_Version:_ $version
-_InstanceName:_ $sqlInstance
-_Username:_ $sqlUser
-_Password:_ $sqlPassword
-_Default Path:_ C:\Program Files (x86)\Microsoft SQL Server
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-SQLPowerShellTools.ps1 b/images/win/scripts/Installers/Validate-SQLPowerShellTools.ps1
index 5af77da6..26dfeddc 100644
--- a/images/win/scripts/Installers/Validate-SQLPowerShellTools.ps1
+++ b/images/win/scripts/Installers/Validate-SQLPowerShellTools.ps1
@@ -4,34 +4,7 @@ $modules = Get-Module -Name SQLPS -ListAvailable
Write-Host "The SQLPS Modules present are:"
$modules | Select-Object Name,Version,Path | Format-Table
-if ($modules) {
- $sqlPSVersion = $modules.Version
-}
-
# Validate the SQLserver PS module installation
$modules = Get-Module -Name SQLServer -ListAvailable
Write-Host "The SQLServer Modules present are:"
$modules | Select-Object Name,Version,Path | Format-Table
-
-if ($modules) {
- $sqlServerPSModuleVersion = $modules.Version
-}
-
-
-# Adding description of the software to Markdown
-$SoftwareName = "SQLPS"
-
-$Description = @"
-_Version:_ $sqlPSVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-# Adding description of the software to Markdown
-$SoftwareName = "SQLServer PS"
-
-$Description = @"
-_Version:_ $sqlServerPSModuleVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Sbt.ps1 b/images/win/scripts/Installers/Validate-Sbt.ps1
index bea29c8b..16944722 100644
--- a/images/win/scripts/Installers/Validate-Sbt.ps1
+++ b/images/win/scripts/Installers/Validate-Sbt.ps1
@@ -3,15 +3,13 @@
## Desc: Validate sbt for Windows
################################################################################
-if((Get-Command -Name 'sbt'))
+if (Get-Command -Name 'sbt')
{
- Write-Host "sbt is on the path"
+ Write-Host 'sbt is on the path'
}
else
{
- Write-Host "sbt is not on path."
+ Write-Host 'sbt is not on path.'
exit 1
}
-# This works around issue where sbt --script-version does some copies and breaks the build
-Add-SoftwareDetailsToMarkdown -SoftwareName "sbt" -DescriptionMarkdown ""
diff --git a/images/win/scripts/Installers/Validate-SeleniumWebDrivers.ps1 b/images/win/scripts/Installers/Validate-SeleniumWebDrivers.ps1
index dd74b95e..7dd9529f 100644
--- a/images/win/scripts/Installers/Validate-SeleniumWebDrivers.ps1
+++ b/images/win/scripts/Installers/Validate-SeleniumWebDrivers.ps1
@@ -13,79 +13,26 @@ $EdgeDriverPath = $env:EdgeWebDriver
Write-Host "EdgeDriverPath: $EdgeDriverPath"
if (
- ($IEDriverPath -like "C:\SeleniumWebDrivers\IEDriver") -and
- ($GeckoDriverPath -like "C:\SeleniumWebDrivers\GeckoDriver") -and
- ($ChromeDriverPath -like "C:\SeleniumWebDrivers\ChromeDriver") -and
- ($EdgeDriverPath -like "C:\SeleniumWebDrivers\EdgeDriver")
+ ($IEDriverPath -like "C:\SeleniumWebDrivers\IEDriver") -and
+ ($GeckoDriverPath -like "C:\SeleniumWebDrivers\GeckoDriver") -and
+ ($ChromeDriverPath -like "C:\SeleniumWebDrivers\ChromeDriver") -and
+ ($EdgeDriverPath -like "C:\SeleniumWebDrivers\EdgeDriver")
)
{
+ Write-Host "IEDriver installed at "
+ (Get-Item "$IEDriverPath\IEDriverServer.exe").VersionInfo
- Write-Host "IEDriver installed at "
- (Get-Item "$IEDriverPath\IEDriverServer.exe").VersionInfo
+ Write-Host "Gecko Driver installed at "
+ (Get-Item "$GeckoDriverPath\geckodriver.exe").VersionInfo
+ Write-Host "Chrome Driver installed at "
+ (Get-Item "$ChromeDriverPath\chromedriver.exe").VersionInfo
- Write-Host "Gecko Driver installed at "
- (Get-Item "$GeckoDriverPath\geckodriver.exe").VersionInfo
-
-
- Write-Host "Chrome Driver installed at "
- (Get-Item "$ChromeDriverPath\chromedriver.exe").VersionInfo
-
-
- Write-Host "Edge Driver installed at "
- (Get-Item "$EdgeDriverPath\msedgedriver.exe").VersionInfo
-
- $versionFileName = "versioninfo.txt";
- $chromedriverversion = Get-Content -Path "$ChromeDriverPath\$versionFileName"
- $geckodriverversion = Get-Content -Path "$GeckoDriverPath\$versionFileName"
- $iedriverversion = Get-Content -Path "$IEDriverPath\$versionFileName"
- $edgedriverversion = Get-Content -Path "$EdgeDriverPath\$versionFileName"
-
- # Adding description of the software to Markdown
- $SoftwareName = "Selenium Web Drivers"
-
- $Description = @"
-
-#### Chrome Driver
-
-_version:_
-$chromedriverversion
-
-_Environment:_
-* ChromeWebDriver: location of chromedriver.exe
-
-#### Gecko Driver
-
-_version:_
-$geckodriverversion
-
-_Environment:_
-* GeckoWebDriver: location of geckodriver.exe
-
-#### IE Driver
-
-_version:_
-$iedriverversion
-
-_Environment:_
-* IEWebDriver: location of IEDriverServer.exe
-
-#### Microsoft Edge Driver
-
-_version:_
-$edgedriverversion
-
-_Environment:_
-* EdgeWebDriver: location of msedgedriver.exe
-
-"@
-
- Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
- exit 0
+ Write-Host "Edge Driver installed at "
+ (Get-Item "$EdgeDriverPath\msedgedriver.exe").VersionInfo
}
else
{
- Write-Host "Selenium Web Drivers are not installed."
+ Write-Host "Selenium Web Drivers are not installed."
exit 1
}
diff --git a/images/win/scripts/Installers/Validate-ServiceFabricSDK.ps1 b/images/win/scripts/Installers/Validate-ServiceFabricSDK.ps1
index d2d69f1b..7984335e 100644
--- a/images/win/scripts/Installers/Validate-ServiceFabricSDK.ps1
+++ b/images/win/scripts/Installers/Validate-ServiceFabricSDK.ps1
@@ -5,40 +5,13 @@
$modules = Get-Module -Name ServiceFabric -ListAvailable
-if(($modules | Measure-Object).Count -gt 0)
+if (($modules | Measure-Object).Count -gt 0)
{
$modules
}
-else {
+else
+{
Write-Host "ServiceFabric Module is not present, it might not be installed"
throw "ServiceFabric Module is not present, it might not be installed"
}
-
-function Get-ServiceFabricSDKVersion
-{
- $regKey = "HKLM:\Software\Microsoft\Service Fabric SDK"
- $installedApplications = Get-ItemProperty -Path $regKey
- $Version = (Get-ItemProperty -Path $regKey).FabricSDKVersion
- return $Version
-}
-
-
-function Get-ServiceFabricVersion
-{
- $regKey = "HKLM:\Software\Microsoft\Service Fabric"
- $installedApplications = Get-ItemProperty -Path $regKey
- $Version = (Get-ItemProperty -Path $regKey).FabricVersion
- return $Version
-}
-
-
-# Adding description of the software to Markdown
-$SoftwareName = "Azure Service Fabric"
-
-$Description = @"
-_SDK Version:_ $(Get-ServiceFabricSDKVersion)
-_Runtime Version:_ $(Get-ServiceFabricVersion)
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Stack.ps1 b/images/win/scripts/Installers/Validate-Stack.ps1
index d24d8954..e52b54b2 100644
--- a/images/win/scripts/Installers/Validate-Stack.ps1
+++ b/images/win/scripts/Installers/Validate-Stack.ps1
@@ -5,23 +5,11 @@
if (Get-Command -Name 'stack')
{
- Write-Host "stack is on the path"
+ Write-Host 'stack is on the path'
}
else
{
- Write-Host "stack is not on path."
+ Write-Host 'stack is not on path.'
exit 1
}
-$StackVersion = stack --version --quiet
-
-# Adding description of the software to Markdown
-$SoftwareName = "Stack"
-
-$Description = @"
-_Version:_ $StackVersion
-_Environment:_
-* PATH: contains location of stack.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Svn.ps1 b/images/win/scripts/Installers/Validate-Svn.ps1
index 2009807e..775190b0 100644
--- a/images/win/scripts/Installers/Validate-Svn.ps1
+++ b/images/win/scripts/Installers/Validate-Svn.ps1
@@ -3,7 +3,7 @@
## Desc: Validate Subversion
################################################################################
-if(Get-Command -Name 'svn')
+if (Get-Command -Name 'svn')
{
Write-Host "Subversion $(svn --version --quiet) is on the path."
}
@@ -12,17 +12,3 @@ else
Write-Host "Subversion is not on the path."
exit 1
}
-
-
-$svnVersion = $(svn --version --quiet)
-
-# Adding description of the software to Markdown
-$SoftwareName = "Subversion"
-
-$Description = @"
-_Version:_ $svnVersion
-_Environment:_
-* PATH: contains location of svn.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-ToolCache.ps1 b/images/win/scripts/Installers/Validate-ToolCache.ps1
index f2e900ae..a44b75a4 100644
--- a/images/win/scripts/Installers/Validate-ToolCache.ps1
+++ b/images/win/scripts/Installers/Validate-ToolCache.ps1
@@ -83,40 +83,6 @@ function Get-SystemDefaultRuby {
exit 1
}
-
- $rubyVersionOnPath = "Ruby $($Matches.version)"
- $description = GetDefaultToolDescription -SoftwareVersion $rubyVersionOnPath -SoftwareLocation $rubyBinOnPath
-
- $gemVersion = & gem -v
- $description += "* Gem Version: $gemVersion
"
-
- return $description
-}
-
-function GetDefaultToolDescription {
- param (
- [Parameter(Mandatory = $True)]
- [string]$SoftwareVersion,
- [Parameter(Mandatory = $True)]
- [string]$SoftwareLocation
- )
-
- $description = "
__System default version:__ $SoftwareVersion
"
- $description += "_Environment:_
"
- $description += "* Location: $SoftwareLocation
"
- $description += "* PATH: contains the location of $SoftwareVersion
"
-
- return $description
-}
-
-function GetMarkdownDescription {
- param (
- [Parameter(Mandatory = $True)]
- [string]$SoftwareVersion,
- [Parameter(Mandatory = $True)]
- [string]$SoftwareArchitecture
- )
- return "_Version:_ $SoftwareVersion ($SoftwareArchitecture)
"
}
function ToolcacheTest {
@@ -142,7 +108,6 @@ function ToolcacheTest {
exit 1
}
- $markdownDescription = ""
$tools = GetToolsByName -SoftwareName $SoftwareName
foreach($tool in $tools)
{
@@ -165,16 +130,12 @@ function ToolcacheTest {
$path = "$softwarePath\$foundVersion\$requiredArchitecture"
RunTestsByPath -ExecTests $ExecTests -Path $path -SoftwareName $SoftwareName -SoftwareVersion $foundVersion -SoftwareArchitecture $requiredArchitecture
-
- $markdownDescription += GetMarkdownDescription -SoftwareVersion $foundVersion -SoftwareArchitecture $requiredArchitecture
}
}
if ($SoftwareName -contains "Ruby") {
- $markdownDescription += Get-SystemDefaultRuby
+ Get-SystemDefaultRuby
}
-
- Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $markdownDescription
}
# Ruby test
diff --git a/images/win/scripts/Installers/Validate-Toolset.ps1 b/images/win/scripts/Installers/Validate-Toolset.ps1
index 048256c3..c5460053 100644
--- a/images/win/scripts/Installers/Validate-Toolset.ps1
+++ b/images/win/scripts/Installers/Validate-Toolset.ps1
@@ -34,7 +34,6 @@ function Validate-SystemDefaultTool {
# Check if tool on path
if (Get-Command -Name $binName) {
$versionOnPath = $(& $binName --version 2>&1) | Select-String -Pattern ".*(\d+\.\d+\.\d+)"
- $versionBinPath = Split-Path -Path (Get-Command -Name $binName).Path
# Check if version is correct
if ($versionOnPath.matches.Groups[1].Value -notlike $ExpectedVersion) {
@@ -47,20 +46,10 @@ function Validate-SystemDefaultTool {
Write-Host "$ToolName is not on path"
exit 1
}
-
- # Add default version description to markdown
- $description = "
__System default version:__ $versionOnPath
"
- $description += "_Environment:_
"
- $description += "* Location: $versionBinPath
"
- $description += "* PATH: contains the location of $versionOnPath
"
-
- return $description
}
$ErrorActionPreference = "Stop"
-Import-Module -Name ImageHelpers -Force
-
# Define executables for cached tools
$toolsExecutables = @{
Python = @("python.exe", "Scripts\pip.exe")
@@ -72,8 +61,6 @@ $toolsExecutables = @{
$tools = Get-ToolsetContent | Select-Object -ExpandProperty toolcache
foreach($tool in $tools) {
- $markdownDescription = ""
-
$toolPath = Join-Path $env:AGENT_TOOLSDIRECTORY $tool.name
# Get executables for current tool
$toolExecs = $toolsExecutables[$tool.name]
@@ -105,22 +92,10 @@ foreach($tool in $tools) {
Write-Host "Run validation test for $($tool.name)($($tool.arch)) $($foundVersion.name) executables..."
Run-ExecutableTests -Executables $toolExecs -ToolPath $foundVersionArchPath
-
- $foundVersionName = $foundVersion.name
- if ($tool.name -eq 'PyPy')
- {
- $pypyVersion = & "$foundVersionArchPath\python.exe" -c "import sys;print(sys.version.split('\n')[1])"
- $foundVersionName = "{0} {1}" -f $foundVersionName, $pypyVersion
- }
- # Add to tool version to markdown
- $markdownDescription += "_Version:_ $foundVersionName
"
}
- # Create markdown description for system default tool
if (-not ([string]::IsNullOrEmpty($tool.default))) {
Write-Host "Validate system default $($tool.name)($($tool.arch)) $($tool.default)..."
- $markdownDescription += Validate-SystemDefaultTool -ToolName $tool.name -ExpectedVersion $tool.default
+ Validate-SystemDefaultTool -ToolName $tool.name -ExpectedVersion $tool.default
}
-
- Add-SoftwareDetailsToMarkdown -SoftwareName "$($tool.name) ($($tool.arch))" -DescriptionMarkdown $markdownDescription
}
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Validate-TypeScript.ps1 b/images/win/scripts/Installers/Validate-TypeScript.ps1
index 94efab7a..b498eceb 100644
--- a/images/win/scripts/Installers/Validate-TypeScript.ps1
+++ b/images/win/scripts/Installers/Validate-TypeScript.ps1
@@ -3,7 +3,7 @@
## Desc: Validate Typescript Installation
################################################################################
-if(Get-Command -Name 'tsc')
+if (Get-Command -Name 'tsc')
{
Write-Host "TypeScript $(tsc --version) is on the path."
}
@@ -12,15 +12,3 @@ else
Write-Host "TypeScript is not on the path."
exit 1
}
-
-
-$typescriptVersion = $(tsc --version)
-
-# Adding description of the software to Markdown
-$SoftwareName = "TypeScript"
-
-$Description = @"
-_Version:_ $typescriptVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-VSWhere.ps1 b/images/win/scripts/Installers/Validate-VSWhere.ps1
index c44ba7d4..850b5f26 100644
--- a/images/win/scripts/Installers/Validate-VSWhere.ps1
+++ b/images/win/scripts/Installers/Validate-VSWhere.ps1
@@ -3,7 +3,7 @@
## Desc: Validate vswhere
################################################################################
-if(Get-Command -Name 'vswhere')
+if (Get-Command -Name 'vswhere')
{
Write-Host "vswhere $(vswhere) on path"
}
@@ -12,14 +12,3 @@ else
Write-Host "vswhere is not on path"
exit 1
}
-
-# Adding description of the software to Markdown
-$SoftwareName = "VSWhere"
-$VswhereVersion = (Get-Command -Name vswhere).FileVersionInfo.ProductVersion
-
-$Description = @"
-_Version_: $VswhereVersion
-* PATH: contains location of vswhere.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Validate-Vcpkg.ps1 b/images/win/scripts/Installers/Validate-Vcpkg.ps1
index 49c6fc04..e10927f1 100644
--- a/images/win/scripts/Installers/Validate-Vcpkg.ps1
+++ b/images/win/scripts/Installers/Validate-Vcpkg.ps1
@@ -16,31 +16,12 @@ else
if ($env:VCPKG_INSTALLATION_ROOT)
{
- Write-Host "The VCPKG_INSTALLATION_ROOT environment variable is set"
+ Write-Host 'The VCPKG_INSTALLATION_ROOT environment variable is set'
Write-Host $env:VCPKG_INSTALLATION_ROOT
}
else
{
- Write-Host "The VCPKG_INSTALLATION_ROOT environment variable is not set"
+ Write-Host 'The VCPKG_INSTALLATION_ROOT environment variable is not set'
exit 1
}
-# Adding description of the software to Markdown
-
-# `vcpkg version` gives output like:
-# Vcpkg package management program version 2018.11.23-nohash
-#
-# See LICENSE.txt for license information.
-
-$SoftwareName = 'Vcpkg'
-$(vcpkg version).Split([System.Environment]::NewLine)[0] -match "\d+.\d+.\d+.*"
-$VcpkgVersion = $Matches[0]
-
-$Description = @"
-_Version:_ $VcpkgVersion
-_Environment:_
-* PATH: contains location of the vcpkg directory
-* VCPKG_INSTALLATION_ROOT: root directory of the vcpkg installation
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-WDK.ps1 b/images/win/scripts/Installers/Validate-WDK.ps1
index 564a0ab2..dfb98249 100644
--- a/images/win/scripts/Installers/Validate-WDK.ps1
+++ b/images/win/scripts/Installers/Validate-WDK.ps1
@@ -3,8 +3,6 @@
## Desc: Validate the installation of the Windows Driver Kit
################################################################################
-Import-Module -Name ImageHelpers -Force
-
function Get-WDKVersion
{
$WDKVersion = (Get-CimInstance -ClassName Win32_Product -Filter "Name = 'Windows Driver Kit'").Version
@@ -14,19 +12,8 @@ function Get-WDKVersion
Write-Host "WDK was not found"
exit 1
}
-
- return $WDKVersion
}
-$WDKVersion = Get-WDKVersion
-$WDKPackageVersion = Get-VSExtensionVersion -packageName "Microsoft.Windows.DriverKit"
+Get-WDKVersion
+$null = Get-VSExtensionVersion -packageName "Microsoft.Windows.DriverKit"
-# Adding description of the software to Markdown
-$SoftwareName = "Windows Driver Kit"
-
-$Description = @"
-_WDK Version:_ $WDKVersion
-_WDK Visual Studio Extension Version:_ $WDKPackageVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-WinAppDriver.ps1 b/images/win/scripts/Installers/Validate-WinAppDriver.ps1
index f92b37c4..ee1a6fc5 100644
--- a/images/win/scripts/Installers/Validate-WinAppDriver.ps1
+++ b/images/win/scripts/Installers/Validate-WinAppDriver.ps1
@@ -3,43 +3,35 @@
## Desc: Validate WinAppDriver installation
################################################################################
-$wad = "Windows Application Driver";
-if (${Env:ProgramFiles(x86)})
+$wad = "Windows Application Driver"
+if (${env:ProgramFiles(x86)})
{
- $wadPath = "${Env:ProgramFiles(x86)}\$wad"
+ $wadPath = "${env:ProgramFiles(x86)}\$wad"
}
else
{
- $wadPath = "${Env:ProgramFiles}\$wad"
+ $wadPath = "${env:ProgramFiles}\$wad"
}
-if(Test-Path $wadPath -PathType Any)
+if (Test-Path $wadPath -PathType Any)
{
- Write-Host "WinAppDriver directory found."
+ Write-Host "WinAppDriver directory found."
}
else
{
- Write-Host "Failed to locate WinAppDriver directory. Exiting."
- exit 1
+ Write-Host "Failed to locate WinAppDriver directory. Exiting."
+ exit 1
}
#Validate if Developer Mode is enabled
$path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock";
-if((Get-ItemProperty -Path $path | Select-Object -ExpandProperty "AllowDevelopmentWithoutDevLicense") -eq 1)
+if ((Get-ItemProperty -Path $path | Select-Object -ExpandProperty "AllowDevelopmentWithoutDevLicense") -eq 1)
{
- Write-Host "Developer Mode is successfully provisioned."
+ Write-Host "Developer Mode is successfully provisioned."
}
else
{
- Write-Host "Developer Mode was not successfully provisioned."
- exit 1
+ Write-Host "Developer Mode was not successfully provisioned."
+ exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "WinAppDriver"
-$version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe").FileVersion
-$Description = @"
-_Version:_ $version
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Wix.ps1 b/images/win/scripts/Installers/Validate-Wix.ps1
index d755939d..184a1bd7 100644
--- a/images/win/scripts/Installers/Validate-Wix.ps1
+++ b/images/win/scripts/Installers/Validate-Wix.ps1
@@ -14,7 +14,7 @@ function Get-WixVersion {
$WixToolSetVersion = Get-WixVersion
-if($WixToolSetVersion) {
+if ($WixToolSetVersion) {
Write-Host "Wix Toolset version" $WixPackage.version "installed"
}
else {
@@ -22,25 +22,12 @@ else {
exit 1
}
-if(Test-IsWin19)
+if (Test-IsWin19)
{
- $WixPackageVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev16"
- $VSver = "2019"
+ $null = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev16"
}
else
{
- $WixPackageVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev15"
- $VSver = "2017"
+ $null = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev15"
}
-# Adding description of the software to Markdown
-$SoftwareName = "WIX Tools"
-
-$Description = @"
-_Toolset Version:_ $WixToolSetVersion
-_WIX Toolset Studio $VSver Extension Version:_ $WixPackageVersion
-_Environment:_
-* WIX: Installation root of WIX
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Validate-Zstd.ps1 b/images/win/scripts/Installers/Validate-Zstd.ps1
index afb6a030..d637b096 100644
--- a/images/win/scripts/Installers/Validate-Zstd.ps1
+++ b/images/win/scripts/Installers/Validate-Zstd.ps1
@@ -5,7 +5,7 @@
if (Get-Command -Name 'zstd')
{
- Write-Host "zstd on path"
+ Write-Host 'zstd on path'
}
else
{
@@ -13,12 +13,3 @@ else
exit 1
}
-# Adding description of the software to Markdown
-$SoftwareName = "zstd"
-$zstdVersion = $(zstd --version).Split(' ')[6].Split(',')[0].Substring(1)
-
-$Description = @"
-_Version:_ $zstdVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 b/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1
index 202c9b48..794c1b0f 100644
--- a/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1
+++ b/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1
@@ -125,48 +125,14 @@ Choco-Install -PackageName webpicmd
# Install vcredist140
Choco-Install -PackageName vcredist140
-
# Expand disk size of OS drive
-
New-Item -Path d:\ -Name cmds.txt -ItemType File -Force
-
Add-Content -Path d:\cmds.txt "SELECT VOLUME=C`r`nEXTEND"
$expandResult = (diskpart /s 'd:\cmds.txt')
-
Write-Host $expandResult
Write-Host "Disk sizes after expansion"
-
wmic logicaldisk get size,freespace,caption
-# Adding description of the software to Markdown
-
-$Content = @"
-
-# Windows Server 2016
-
-The following software is installed on machines with the $env:ImageVersion update.
-
-Components marked with **\*** have been upgraded since the previous version of the image.
-
-"@
-
-Add-ContentToMarkdown -Content $Content
-
-
-$SoftwareName = "Chocolatey"
-
-if( $( $(choco version) | Out-String) -match 'Chocolatey v(?.*).*' )
-{
- $chocoVersion = $Matches.version.Trim()
-}
-
-$Description = @"
-_Version:_ $chocoVersion
-_Environment:_
-* PATH: contains location for choco.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Windows2016/Install-VS2017.ps1 b/images/win/scripts/Installers/Windows2016/Install-VS2017.ps1
index 45fae7cd..448cbfdc 100644
--- a/images/win/scripts/Installers/Windows2016/Install-VS2017.ps1
+++ b/images/win/scripts/Installers/Windows2016/Install-VS2017.ps1
@@ -106,41 +106,3 @@ Write-Host "Visual Studio version ${version} installed"
# Updating content of MachineState.json file to disable autoupdate of VSIX extensions
$newContent = '{"Extensions":[{"Key":"1e906ff5-9da8-4091-a299-5c253c55fdc9","Value":{"ShouldAutoUpdate":false}},{"Key":"Microsoft.VisualStudio.Web.AzureFunctions","Value":{"ShouldAutoUpdate":false}}],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}'
Set-Content -Path "$VSInstallRoot\Common7\IDE\Extensions\MachineState.json" -Value $newContent
-
-# Adding description of the software to Markdown
-
-$SoftwareName = "Visual Studio 2017 $ReleaseInPath"
-
-$Description = @"
-_Version:_ $version
-_Location:_ $VSInstallRoot
-
-The following workloads including required and recommended components are installed with Visual Studio 2017:
-
-* Universal Windows Platform development
-* .NET desktop development
-* Desktop development with C++
-* ASP.NET and web development
-* Azure development
-* Node.js development
-* Data storage and processing
-* Data science and analytical applications *
-* Game development with Unity *
-* Linux development with C++ *
-* Game development with C++ *
-* Mobile development with C++ *
-* Office/SharePoint development
-* Mobile development with .NET
-* .NET Core cross-platform development
-* Visual Studio extension development *
-* Python development *
-* Mobile development with JavaScript *
-
-In addition the following optional components are installed:
-
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-# Adding explicitly added Workloads details to markdown by parsing $Workloads
-Add-ContentToMarkdown -Content $($WorkLoads.Split('--') | % { if( ($_.Split(" "))[0] -like "add") { "* " +($_.Split(" "))[1] } } )
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Windows2016/Update-DockerImages.ps1 b/images/win/scripts/Installers/Windows2016/Update-DockerImages.ps1
index d396d018..bd032ea3 100644
--- a/images/win/scripts/Installers/Windows2016/Update-DockerImages.ps1
+++ b/images/win/scripts/Installers/Windows2016/Update-DockerImages.ps1
@@ -11,7 +11,7 @@ function DockerPull {
docker pull $image
if (!$?) {
- echo "Docker pull failed with a non-zero exit code"
+ Write-Host "Docker pull failed with a non-zero exit code"
exit 1
}
}
@@ -22,14 +22,3 @@ DockerPull microsoft/aspnetcore-build:1.0-2.0
DockerPull mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2016
DockerPull mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2016
-# Adding description of the software to Markdown
-
-$SoftwareName = "Docker images"
-
-$Description = @"
-The following container images have been cached:
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-Add-ContentToMarkdown -Content $(docker images --digests --format "* {{.Repository}}:{{.Tag}} (Digest: {{.Digest}})")
diff --git a/images/win/scripts/Installers/Windows2016/Validate-SSDT.ps1 b/images/win/scripts/Installers/Windows2016/Validate-SSDT.ps1
index 40444ee1..e7112db0 100644
--- a/images/win/scripts/Installers/Windows2016/Validate-SSDT.ps1
+++ b/images/win/scripts/Installers/Windows2016/Validate-SSDT.ps1
@@ -3,22 +3,5 @@
## Desc: Validate SQL Server Data Tools for Windows
################################################################################
-Import-Module -Name ImageHelpers -Force
+$null = Get-VSExtensionVersion -packageName "SSDT"
-$SSDTPackageVersion = Get-VSExtensionVersion -packageName "SSDT"
-
-# Adding description of the software to Markdown
-$SoftwareName = "SQL Server Data Tools for VS 2017"
-
-$Description = @"
-_Version:_ $SSDTPackageVersion
-
-The following components are installed:
-
-* SQL Server Data Tools
-* SQL Server Analysis Services Designer
-* SQL Server Integration Services Designer
-* SQL Server Reporting Services Designers
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 b/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1
index 12feeabe..99c238e8 100644
--- a/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1
+++ b/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1
@@ -120,46 +120,12 @@ Remove-Item -Path $env:ChocolateyInstall\bin\cpack.exe -Force
Choco-Install -PackageName webpicmd
# Expand disk size of OS drive
-
New-Item -Path d:\ -Name cmds.txt -ItemType File -Force
-
Add-Content -Path d:\cmds.txt "SELECT VOLUME=C`r`nEXTEND"
$expandResult = (diskpart /s 'd:\cmds.txt')
-
Write-Host $expandResult
Write-Host "Disk sizes after expansion"
-
wmic logicaldisk get size,freespace,caption
-
-# Adding description of the software to Markdown
-
-$Content = @"
-
-# Windows Server 2019
-
-The following software is installed on machines with the $env:ImageVersion update.
-
-Components marked with **\*** have been upgraded since the previous version of the image.
-
-"@
-
-Add-ContentToMarkdown -Content $Content
-
-
-$SoftwareName = "Chocolatey"
-
-if( $( $(choco version) | Out-String) -match 'Chocolatey v(?.*).*' )
-{
- $chocoVersion = $Matches.version.Trim()
-}
-
-$Description = @"
-_Version:_ $chocoVersion
-_Environment:_
-* PATH: contains location for choco.exe
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
diff --git a/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1 b/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1
index e1a9c4d0..8b335c8b 100644
--- a/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1
+++ b/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1
@@ -135,28 +135,3 @@ $sdkFileName = "sdksetup14393.exe"
$argumentList = ("/q", "/norestart", "/ceip off", "/features OptionId.WindowsSoftwareDevelopmentKit")
Install-Binary -Url $sdkUrl -Name $sdkFileName -ArgumentList $argumentList
-
-# Adding description of the software to Markdown
-
-$SoftwareName = "Visual Studio 2019 Enterprise"
-
-$Description = @"
-_Version:_ $version
-_Location:_ $VSInstallRoot
-
-The following workloads and components are installed with Visual Studio 2019:
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-# Adding explicitly added Workloads details to markdown by parsing $Workloads
-Add-ContentToMarkdown -Content $($WorkLoads.Split('--') | % { if( ($_.Split(" "))[0] -like "add") { "* " +($_.Split(" "))[1] } } )
-
-# Adding additional SDKs to markdown
-$SDKDescription = @"
-
-Additional Windows 10 SDKs:
-* Windows 10 SDK version 10.0.14393.795
-"@
-
-Add-ContentToMarkdown -Content $SDKDescription
diff --git a/images/win/scripts/Installers/Windows2019/Update-DockerImages.ps1 b/images/win/scripts/Installers/Windows2019/Update-DockerImages.ps1
index 2e15f85e..bc50a9bc 100644
--- a/images/win/scripts/Installers/Windows2019/Update-DockerImages.ps1
+++ b/images/win/scripts/Installers/Windows2019/Update-DockerImages.ps1
@@ -11,7 +11,7 @@ function DockerPull {
docker pull $image
if (!$?) {
- echo "Docker pull failed with a non-zero exit code"
+ Write-Host "Docker pull failed with a non-zero exit code"
exit 1
}
}
@@ -22,15 +22,3 @@ DockerPull microsoft/aspnetcore-build:1.0-2.0
DockerPull mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
DockerPull mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019
-
-# Adding description of the software to Markdown
-
-$SoftwareName = "Docker images"
-
-$Description = @"
-The following container images have been cached:
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
-
-Add-ContentToMarkdown -Content $(docker images --digests --format "* {{.Repository}}:{{.Tag}} (Digest: {{.Digest}})")
diff --git a/images/win/scripts/Installers/Windows2019/Validate-SSDTExtensions.ps1 b/images/win/scripts/Installers/Windows2019/Validate-SSDTExtensions.ps1
index 731c10ed..4cf24bed 100644
--- a/images/win/scripts/Installers/Windows2019/Validate-SSDTExtensions.ps1
+++ b/images/win/scripts/Installers/Windows2019/Validate-SSDTExtensions.ps1
@@ -3,20 +3,7 @@
## Desc: Validate SQL Server Data Tools Visual Studio extensions
################################################################################
-Import-Module -Name ImageHelpers -Force
-
#These extensions don't have any proper name in the state.packages.json file, only id is available, which can be found on extension marketplace download page
-$AnalysisPackageVersion = Get-VSExtensionVersion -packageName "04a86fc2-dbd5-4222-848e-911638e487fe"
-$IntegrationPackageVersion = Get-VSExtensionVersion -packageName "851E7A09-7B2B-4F06-A15D-BABFCB26B970"
-$ReportingPackageVersion = Get-VSExtensionVersion -packageName "717ad572-c4b7-435c-c166-c2969777f718"
-
-# Adding description of the software to Markdown
-$SoftwareName = "Microsoft SSDT Visual Studio 2019 Extensions"
-
-$Description = @"
-_Microsoft Analysis Services Projects Version:_ $AnalysisPackageVersion
-_SQL Server Integration Services Projects Version:_ $IntegrationPackageVersion
-_Microsoft Reporting Services Projects Version:_ $ReportingPackageVersion
-"@
-
-Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
+$null = Get-VSExtensionVersion -packageName "04a86fc2-dbd5-4222-848e-911638e487fe"
+$null = Get-VSExtensionVersion -packageName "851E7A09-7B2B-4F06-A15D-BABFCB26B970"
+$null = Get-VSExtensionVersion -packageName "717ad572-c4b7-435c-c166-c2969777f718"