You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
44 lines
1.3 KiB
[CmdletBinding()]
|
|
param()
|
|
|
|
$ErrorActionPreference = 'Continue'
|
|
|
|
Write-Host '[host] CPU virtualization / DEP'
|
|
try {
|
|
Get-CimInstance Win32_Processor |
|
|
Select-Object Name,
|
|
VirtualizationFirmwareEnabled,
|
|
SecondLevelAddressTranslationExtensions,
|
|
DataExecutionPrevention_Available |
|
|
Format-Table -AutoSize
|
|
} catch {
|
|
Write-Warning "Unable to query CPU virtualization state: $($_.Exception.Message)"
|
|
}
|
|
|
|
Write-Host ''
|
|
Write-Host '[host] Required Windows optional features'
|
|
$features = @(
|
|
'Microsoft-Windows-Subsystem-Linux',
|
|
'VirtualMachinePlatform',
|
|
'Microsoft-Hyper-V-All',
|
|
'HypervisorPlatform'
|
|
)
|
|
|
|
foreach ($feature in $features) {
|
|
try {
|
|
Get-WindowsOptionalFeature -Online -FeatureName $feature |
|
|
Select-Object FeatureName,State |
|
|
Format-Table -AutoSize
|
|
} catch {
|
|
Write-Warning "Unable to query ${feature}. Run this script from an elevated PowerShell prompt to inspect Windows optional features."
|
|
}
|
|
}
|
|
|
|
Write-Host ''
|
|
Write-Host '[host] Docker daemon'
|
|
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..')
|
|
$DockerConfig = Join-Path $RepoRoot 'docker\.docker-config'
|
|
New-Item -ItemType Directory -Force $DockerConfig | Out-Null
|
|
$env:DOCKER_CONFIG = $DockerConfig
|
|
|
|
docker version
|
|
|