mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Windows] Set WSLv1 version on Windows Server 2022 (#5762)
* Set WSLv1 version on Windows Server 2022 * Create path if missing
This commit is contained in:
committed by
GitHub
parent
a58f12fe95
commit
e42b607790
@@ -6,6 +6,13 @@
|
||||
Write-Host "Cleanup WinSxS"
|
||||
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
|
||||
|
||||
# Sets the default install version to v1 for new distributions
|
||||
# https://github.com/actions/virtual-environments/issues/5760
|
||||
if (Test-IsWin22) {
|
||||
Write-Host "Sets the default install version to v1 for new distributions"
|
||||
Add-DefaultItem -DefaultVariable "DefaultVersion" -Value 1 -Name "DEFAULT\Software\Microsoft\Windows\CurrentVersion\Lxss" -Kind "DWord"
|
||||
}
|
||||
|
||||
Write-Host "Clean up various directories"
|
||||
@(
|
||||
"$env:SystemDrive\Recovery",
|
||||
|
||||
Reference in New Issue
Block a user