We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b55aea commit 4142e92Copy full SHA for 4142e92
internal/functions/Test-PSDCHyperVEnabled.ps1
@@ -88,14 +88,19 @@
88
}
89
elseif ($osDetails.Caption -like '*Windows Server*') {
90
if ($computer.IsLocalhost) {
91
- $feature = Get-WindowsFeature -Name 'Hyper-V'
+ $feature = Get-WindowsFeature -Name 'Hyper-V', 'Hyper-V-PowerShell'
92
93
else{
94
$command = [scriptblock]::Create("Get-WindowsFeature -Name 'Hyper-V'")
95
$feature = Invoke-PSFCommand -ComputerName $computer -ScriptBlock $command -Credential $Credential
96
97
98
- return $feature.Installed
+ if($feature.Installed -contains $false){
99
+ return $false
100
+ }
101
+ else{
102
+ return $true
103
104
105
106
0 commit comments