diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index cf10a90330f7..d5bf5f739bbe 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -109,6 +109,14 @@ ], "execution_policy": "unrestricted" }, + { + "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Windows2019/Install-WSL.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -243,6 +251,12 @@ "{{ template_dir }}/scripts/Installers/Validate-Wix.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-WSL.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -1062,4 +1076,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/images/win/scripts/Installers/Validate-WSL.ps1 b/images/win/scripts/Installers/Validate-WSL.ps1 new file mode 100644 index 000000000000..83da69339b2b --- /dev/null +++ b/images/win/scripts/Installers/Validate-WSL.ps1 @@ -0,0 +1,14 @@ +################################################################################ +## File: Validate-WSL.ps1 +## Desc: Validate WSL CLI existst +################################################################################ + +if (Get-Command -Name 'wsl') +{ + Write-Host 'wsl is on path' +} +else +{ + Write-Host 'wsl not on path' + exit 1 +} diff --git a/images/win/scripts/Installers/Windows2019/Install-WSL.ps1 b/images/win/scripts/Installers/Windows2019/Install-WSL.ps1 new file mode 100644 index 000000000000..2e83a1b857a8 --- /dev/null +++ b/images/win/scripts/Installers/Windows2019/Install-WSL.ps1 @@ -0,0 +1,8 @@ +################################################################################ +## File: Install-WSL.ps1 +## Desc: Install Windows Subsystem for Linux +################################################################################ + +Write-Host "Install Windows Subsystem for Linux" + +Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart \ No newline at end of file diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 6e643fcf0ef2..bc538c840842 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -22,6 +22,11 @@ $markdown += New-MDList -Style Unordered -Lines @( "Image Version: $env:ImageVersion" ) +$markdown += New-MDHeader "Enabled windows optional features" -Level 2 +$markdown += New-MDList -Style Unordered -Lines @( + "Windows Subsystem for Linux" +) + $markdown += New-MDHeader "Installed Software" -Level 2 $markdown += New-MDHeader "Language and Runtime" -Level 3