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:
@@ -10278,7 +10278,7 @@ function Set-HVGlobalSettings {
|
|||||||
process {
|
process {
|
||||||
|
|
||||||
$updates = @()
|
$updates = @()
|
||||||
if ($key -and $value) {
|
if ( $PSBoundParameters.ContainsKey('Key') -and $PSBoundParameters.ContainsKey('Value') ) {
|
||||||
$updates += Get-MapEntry -key $key -value $value
|
$updates += Get-MapEntry -key $key -value $value
|
||||||
} elseif ($key -or $value) {
|
} elseif ($key -or $value) {
|
||||||
Write-Error "Both key:[$key] and value:[$value] needs to be specified"
|
Write-Error "Both key:[$key] and value:[$value] needs to be specified"
|
||||||
|
|||||||
Reference in New Issue
Block a user