From d5f851339b26c0343e02c85ed3245f0844120be8 Mon Sep 17 00:00:00 2001 From: Ivy Huang Date: Thu, 17 Mar 2022 16:11:21 +0800 Subject: [PATCH 1/2] 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 From 6188524f90af6182cdf4ee08810f97c53d1eab80 Mon Sep 17 00:00:00 2001 From: Ivy Huang Date: Fri, 18 Mar 2022 14:58:44 +0800 Subject: [PATCH 2/2] support enableCollaboration parameter for new-hvpool Function New-HVPool 1. support the setup with json object DesktopSettings.displayProtocolSettings.enableCollaboration 2. support the parameter enableCollaboration --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index 7d5a09d..9c959ac 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -3857,6 +3857,9 @@ function New-HVPool { [int]$refreshThresholdPercentageForReplicaOsDisk, #DesktopDisplayProtocolSettings + [Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')] + [boolean]$enableCollaboration = $true, + #desktopSpec.desktopSettings.logoffSettings.supportedDisplayProtocols [Parameter(Mandatory = $false,ParameterSetName = 'FULL_CLONE')] [Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')] @@ -4626,6 +4629,7 @@ function New-HVPool { $maxResolutionOfAnyOneMonitor = $jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings.maxResolutionOfAnyOneMonitor } $enableHTMLAccess = $jsonObject.DesktopSettings.displayProtocolSettings.enableHTMLAccess + $enableCollaboration = $jsonObject.DesktopSettings.displayProtocolSettings.EnableCollaboration } if ($null -ne $jsonObject.DesktopSettings.mirageConfigurationOverrides) { @@ -4934,6 +4938,7 @@ function New-HVPool { $desktopDisplayProtocolSettings.getDataObject().SupportedDisplayProtocols = $supportedDisplayProtocols $desktopDisplayProtocolSettings.setDefaultDisplayProtocol($defaultDisplayProtocol) $desktopDisplayProtocolSettings.setEnableHTMLAccess($enableHTMLAccess) + $desktopDisplayProtocolSettings.setEnableCollaboration($enableCollaboration) $desktopDisplayProtocolSettings.setAllowUsersToChooseProtocol($allowUsersToChooseProtocol) $desktopPCoIPDisplaySettings = $desktopSettingsService.getDesktopPCoIPDisplaySettingsHelper()