Hey Y’all,
The bug I reported in 1903 with Get-CimInstance -ClassName ‘Win32_Processor’
returning an incorrect value for the .VirtualizationFirmwareEnabled member persists in 1909.
I’ve developed some PS code that will work around the problem if you need to test the status of you Virutialization Hardware/Software.
PowerShell:
Clear-Host $HyperV = "" $HVStatus = "" $CurOS = Get-CimInstance -ClassName 'Win32_OperatingSystem' $WinHome = $CurOS.OperatingSystemSKU -eq 101 $x = Systeminfo #$x will contain an array of strings! For ($cntr = 0; $cntr -lt $x.count ; $cntr++) { If ($x[$cntr].contains('Hyper-V Requirements:')) { $HVStart = $cntr } # End If } # End For If ($WinHome) { For ($cntr = $HVStart; $cntr -lt $x.count ; $cntr++) { If ($x[$cntr].contains( 'A hypervisor has been detected.')) { $HyperV = 'Enabled' } If ($x[$cntr].contains( 'Virtualization Enabled In Firmware: Yes')) { $HyperV = 'Enabled' } If ($x[$cntr].contains( 'Virtualization Enabled In Firmware: No')) { $HyperV = 'Disabled' } } #End For $FeatureName = 'HypervisorPlatform' } #End If Else { #Win 10 Pro or above... For ($cntr = $HVStart; $cntr -lt $x.count ; $cntr++) { If ($x[$cntr].contains( 'A hypervisor has been detected.')) { $HyperV = 'Enabled' } Else { $HyperV = 'Disabled' } } #End For $FeatureName = 'Microsoft-Hyper-V' } #End Else $GWOFArgs = @{Online = $True FeatureName = $FeatureName} $HVStatus = (Get-WindowsOptionalFeature @GWOFArgs).State "Hardware Status: $HyperV`nSoftware Status: $HVStatus"
Results:
Hardware Status: Enabled Software Status: Enabled
HTH