From d5f851339b26c0343e02c85ed3245f0844120be8 Mon Sep 17 00:00:00 2001 From: Ivy Huang Date: Thu, 17 Mar 2022 16:11:21 +0800 Subject: [PATCH] take $jsonObject.ManualDesktopSpec.VirtualCenter ManualDesktopSpec.VirtualCenter of json file was not taken care of. This could cause new-hvpool fail when creating with json file and there are multiple vcenters added to broker. --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index 8f86807..7d5a09d 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -4561,6 +4561,9 @@ function New-HVPool { } elseIf ($jsonObject.type -eq "MANUAL") { $MANUAL = $true $poolType = 'MANUAL' + if ($null -ne $jsonObject.ManualDesktopSpec.VirtualCenter) { + $vCenter = $jsonObject.ManualDesktopSpec.VirtualCenter + } $userAssignment = $jsonObject.ManualDesktopSpec.userAssignment.userAssignment $automaticAssignment = $jsonObject.ManualDesktopSpec.userAssignment.AutomaticAssignment $source = $jsonObject.ManualDesktopSpec.source