Filing this issue for tracking purposes. The cause has been identified, and a PR is in progress to provide a fix.
The below exception is logged when a $false value is passed via the -Value parameter of Set-HVGlobalSettings. This seems to be due to the way that we are checking that both -Key and -Value are set. The intent is that we want to check for the presence of both parameters, but the statement evaluates false since we are evaluating if they are both 'true' instead. See line 10281
PS> Set-HVGlobalSettings -Key 'generalData.hideDomainListInClient' -Value $false
Set-HVGlobalSettings : Both key:[generalData.hideDomainListInClient] and value:[False] needs to be specified
At line:1 char:1
+ Set-HVGlobalSettings -Key 'generalData.hideDomainListInClient' -Value ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExeception
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Set-HVGlobalSettings
Upcoming PR will address this by changing the condition
from:
if ($key -and $value) {
to:
if ( $PSBoundParameters.ContainsKey('Key') -and $PSBoundParameters.ContainsKey('Value') ) {
Filing this issue for tracking purposes. The cause has been identified, and a PR is in progress to provide a fix.
The below exception is logged when a
$false
value is passed via the-Value
parameter ofSet-HVGlobalSettings
. This seems to be due to the way that we are checking that both-Key
and-Value
are set. The intent is that we want to check for the presence of both parameters, but the statement evaluates false since we are evaluating if they are both 'true' instead. See line 10281Upcoming PR will address this by changing the condition
from:
if ($key -and $value) {
to:
if ( $PSBoundParameters.ContainsKey('Key') -and $PSBoundParameters.ContainsKey('Value') ) {