mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-15 14:26:48 +00:00
Inital commit.
This commit is contained in:
16
images/win/scripts/Installers/Install-ContainersFeature.ps1
Normal file
16
images/win/scripts/Installers/Install-ContainersFeature.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
################################################################################
|
||||
## File: Install-ContainersFeature.ps1
|
||||
## Desc: Install Windows container features.
|
||||
## Must be an independent step becuase it requires a machine restart
|
||||
## before we can continue.
|
||||
################################################################################
|
||||
|
||||
Write-Host "Install Containers feature"
|
||||
Install-WindowsFeature -Name Containers
|
||||
|
||||
if ((GWMI Win32_Processor).VirtualizationFirmwareEnabled[0] -and (GWMI Win32_Processor).SecondLevelAddressTranslationExtensions[0]) {
|
||||
Write-Host "Install Hyper-V feature"
|
||||
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools
|
||||
} else {
|
||||
Write-Host "Skipping installation of Hyper-V feature"
|
||||
}
|
||||
Reference in New Issue
Block a user