Address Issue 496 (#497)

Addressing Issue 496 to resolve the unintentional false condition when `-Value` is set to `$false` on `Set-HVGlobalSettings

Signed-off-by: Matt Frey <mfrey@vmware.com>
This commit is contained in:
Matt Frey
2021-11-25 06:34:40 -06:00
committed by GitHub
parent 8830d3ec2d
commit 2ec8f92823

View File

@@ -10278,7 +10278,7 @@ function Set-HVGlobalSettings {
process {
$updates = @()
if ($key -and $value) {
if ( $PSBoundParameters.ContainsKey('Key') -and $PSBoundParameters.ContainsKey('Value') ) {
$updates += Get-MapEntry -key $key -value $value
} elseif ($key -or $value) {
Write-Error "Both key:[$key] and value:[$value] needs to be specified"