Stu576 / PowerBlade

A PowerShell application that will continuously have features added
0 stars 0 forks source link

Hyper-V Requirement checks #1

Open Stu576 opened 1 month ago

Stu576 commented 1 month ago

There is no check to make sure the machine supports Hyper-V, only a simple check that if virtualisation has been enabled in BIOS but no check for the following:

PS C:\temp> Get-ComputerInfo -property "HyperV*"

HyperVisorPresent : True HyperVRequirementDataExecutionPreventionAvailable : True HyperVRequirementSecondLevelAddressTranslation : True HyperVRequirementVirtualizationFirmwareEnabled : True HyperVRequirementVMMonitorModeExtensions : True

Ref: https://stackoverflow.com/questions/49005791/how-to-check-if-intel-virtualization-is-enabled-without-going-to-bios-in-windows

Stu576 commented 1 month ago

Updated code to perform check and testing was successful.

BUT

When SVM is enabled in Bios, these checks don't report back and hypervisor enabled is the only confirmation that features are supported. Need to add a check for this option and if null, perform other check

IF (Hypervisor check is null) {Do normal check} Elseif(hypervisor check is $true) {Go ahead with installation}