@@ -3925,18 +3925,26 @@ function New-HVPool {
3925
3925
[boolean]$enableHTMLAccess = $false,
3926
3926
3927
3927
# DesktopPCoIPDisplaySettings
3928
- #desktopSpec.desktopSettings.logoffSettings .pcoipDisplaySettings.renderer3D
3928
+ #desktopSpec.desktopSettings.DisplayProtocolSettings .pcoipDisplaySettings.renderer3D
3929
3929
[Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
3930
3930
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
3931
3931
[Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
3932
3932
[ValidateSet('MANAGE_BY_VSPHERE_CLIENT', 'AUTOMATIC', 'SOFTWARE', 'HARDWARE', 'DISABLED')]
3933
3933
[string]$renderer3D = 'DISABLED',
3934
3934
3935
- #desktopSpec.desktopSettings.logoffSettings .pcoipDisplaySettings.enableGRIDvGPUs
3935
+ #desktopSpec.desktopSettings.DisplayProtocolSettings .pcoipDisplaySettings.enableGRIDvGPUs
3936
3936
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
3937
3937
[Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
3938
+ [Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
3938
3939
[boolean]$enableGRIDvGPUs = $false,
3939
3940
3941
+ #desktopSpec.desktopSettings.DisplayProtocolSettings.pcoipDisplaySettings.VGPUGridProfile
3942
+ [Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
3943
+ # [Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
3944
+ [Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
3945
+ [ValidateSet('grid_m10-0b','grid_m10-1b','grid_m10-2b','grid_m10-0q','grid_m10-1q','grid_m10-2q','grid_m10-4q','grid_m10-8q')]
3946
+ [string]$VGPUGridProfile = $null,
3947
+
3940
3948
#desktopSpec.desktopSettings.logoffSettings.pcoipDisplaySettings.vRamSizeMB
3941
3949
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
3942
3950
[ValidateRange(64,512)]
@@ -4010,6 +4018,12 @@ function New-HVPool {
4010
4018
[string]
4011
4019
$SnapshotVM,
4012
4020
4021
+ #desktopSpec.automatedDesktopSpec.virtualCenterProvisioningSettings.addVirtualTPM if INSTANT_CLONE, ???
4022
+ # [Parameter(Mandatory = $true,ParameterSetName = "LINKED_CLONE")]
4023
+ [Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
4024
+ [ValidateNotNullOrEmpty()]
4025
+ [boolean]$addVirtualTPM = $false,
4026
+
4013
4027
#desktopSpec.automatedDesktopSpec.virtualCenterProvisioningSettings.virtualCenterProvisioningData.vmFolder if LINKED_CLONE, INSTANT_CLONE, FULL_CLONE
4014
4028
[Parameter(Mandatory = $true,ParameterSetName = "LINKED_CLONE")]
4015
4029
[Parameter(Mandatory = $true,ParameterSetName = 'INSTANT_CLONE')]
@@ -4515,6 +4529,9 @@ function New-HVPool {
4515
4529
if ($null -ne $jsonObject.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.VirtualCenterProvisioningData.Snapshot) {
4516
4530
$snapshotVM = $jsonObject.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.VirtualCenterProvisioningData.Snapshot
4517
4531
}
4532
+ if ($null -ne $jsonObject.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.addVirtualTPM) {
4533
+ $addVirtualTPM = $jsonObject.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.addVirtualTPM
4534
+ }
4518
4535
$dataCenter = $jsonObject.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.VirtualCenterProvisioningData.dataCenter
4519
4536
$vmFolder = $jsonObject.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.VirtualCenterProvisioningData.VmFolder
4520
4537
$hostOrCluster = $jsonObject.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.VirtualCenterProvisioningData.HostOrCluster
@@ -4658,6 +4675,7 @@ function New-HVPool {
4658
4675
if ($null -ne $jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings) {
4659
4676
$renderer3D = $jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings.renderer3D
4660
4677
$enableGRIDvGPUs = $jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings.enableGRIDvGPUs
4678
+ $VGPUGridProfile = $jsonObject.DesktopSettings.DisplayProtocolSettings.PcoipDisplaySettings.VGPUGridProfile
4661
4679
if ($jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings.vRamSizeMB) {
4662
4680
$vRamSizeMB = $jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings.vRamSizeMB
4663
4681
}
@@ -4907,6 +4925,7 @@ function New-HVPool {
4907
4925
$desktopSpecObj.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.VirtualCenterProvisioningData = $desktopVirtualCenterProvisioningData
4908
4926
$desktopSpecObj.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.VirtualCenterStorageSettings = $desktopVirtualCenterStorageSettings
4909
4927
$desktopSpecObj.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.VirtualCenterNetworkingSettings = $DesktopVirtualCenterNetworkingSettings
4928
+ $desktopSpecObj.AutomatedDesktopSpec.VirtualCenterProvisioningSettings.AddVirtualTPM = $AddVirtualTPM
4910
4929
$desktopSpecObj.AutomatedDesktopSpec.CustomizationSettings = $desktopCustomizationSettings
4911
4930
$desktopSpecObj.AutomatedDesktopSpec.ProvisioningType = $provisioningType
4912
4931
$desktopSpecObj.AutomatedDesktopSpec.VirtualCenter = $virtualCenterID
@@ -4915,6 +4934,7 @@ function New-HVPool {
4915
4934
$DesktopVirtualCenterProvisioningSettings.VirtualCenterProvisioningData = $desktopVirtualCenterProvisioningData
4916
4935
$DesktopVirtualCenterProvisioningSettings.VirtualCenterStorageSettings = $desktopVirtualCenterStorageSettings
4917
4936
$DesktopVirtualCenterProvisioningSettings.VirtualCenterNetworkingSettings = $DesktopVirtualCenterNetworkingSettings
4937
+ $DesktopVirtualCenterProvisioningSettings.AddVirtualTPM = $AddVirtualTPM
4918
4938
4919
4939
$DesktopAutomatedDesktopSpec = New-Object VMware.Hv.DesktopAutomatedDesktopSpec
4920
4940
$DesktopAutomatedDesktopSpec.ProvisioningType = $provisioningType
@@ -4981,6 +5001,16 @@ function New-HVPool {
4981
5001
$desktopPCoIPDisplaySettings.setRenderer3D($renderer3D)
4982
5002
#setEnableGRIDvGPUs is not exists, because this property cannot be updated.
4983
5003
$desktopPCoIPDisplaySettings.getDataObject().EnableGRIDvGPUs = $enableGRIDvGPUs
5004
+ if ($enableGRIDvGPUs -eq $true -and $renderer3D -ne 'MANAGE_BY_VSPHERE_CLIENT' -and $InstantClone -eq $true) {
5005
+ Write-Error "Enabling GRID support requires that 3D rendering be managed by the vSphere client"
5006
+ break
5007
+ }
5008
+ if ($enableGRIDvGPUs -eq $true -and [string]::IsNullOrEmpty($VGPUGridProfile) -eq $true -and $InstantClone -ne $true) {
5009
+ Write-Error "Enabling GRID support for Instant clones, this requires a specified VGPUGridProfile"
5010
+ break
5011
+ } else {
5012
+ $desktopPCoIPDisplaySettings.getDataObject().VGPUGridProfile = $VGPUGridProfile
5013
+ }
4984
5014
$desktopPCoIPDisplaySettings.setVRamSizeMB($vRamSizeMB)
4985
5015
$desktopPCoIPDisplaySettings.setMaxNumberOfMonitors($maxNumberOfMonitors)
4986
5016
$desktopPCoIPDisplaySettings.setMaxResolutionOfAnyOneMonitor($maxResolutionOfAnyOneMonitor)
@@ -6569,6 +6599,16 @@ function Start-HVFarm {
6569
6599
How frequently to repeat maintenance, expressed as a multiple of the maintenance period. e.g. Every 2 weeks.
6570
6600
This property has a default value of 1. This property has values 1-100.
6571
6601
6602
+ .PARAMETER NumCPU
6603
+ Number of CPU of the Vm Instances
6604
+
6605
+ .PARAMETER Ram
6606
+ Ram of the Vm Instances
6607
+ Units in MB for Ram parameter
6608
+
6609
+ .PARAMETER CoresPerSocket
6610
+ CoresPerSocket of the Vm Instances
6611
+
6572
6612
.PARAMETER HvServer
6573
6613
Reference to Horizon View Server to query the data from. If the value is not passed or null then first element from global:DefaultHVServers would be considered in-place of hvServer.
6574
6614
@@ -6673,6 +6713,21 @@ function Start-HVFarm {
6673
6713
[ValidateRange(1, 100)]
6674
6714
[int]$EveryInt = 1,
6675
6715
6716
+ [Parameter(Mandatory = $false)]
6717
+ [ValidateRange(1,[Int]::MaxValue)]
6718
+ [int]
6719
+ $NumCPU = 4,
6720
+
6721
+ [Parameter(Mandatory = $false)]
6722
+ [ValidateRange(1,[Int]::MaxValue)]
6723
+ [int]
6724
+ $Ram = 16384,
6725
+
6726
+ [Parameter(Mandatory = $false)]
6727
+ [ValidateRange(1,[Int]::MaxValue)]
6728
+ [int]
6729
+ $CoresPerSocket = 1,
6730
+
6676
6731
[Parameter(Mandatory = $false)]
6677
6732
$HvServer = $null
6678
6733
)
@@ -6820,6 +6875,13 @@ function Start-HVFarm {
6820
6875
break
6821
6876
}
6822
6877
}
6878
+
6879
+ #set ComputeProfile in a SCHEDULEMAINTENANCE
6880
+ $spec.ComputeProfile = New-Object VMware.Hv.FarmComputeProfileSpec
6881
+ $spec.ComputeProfile.NumCPU = $NumCPU
6882
+ $spec.ComputeProfile.Ram = $Ram
6883
+ $spec.ComputeProfile.CoresPerSocket = $CoresPerSocket
6884
+
6823
6885
# call scheduleMaintenance service on farm
6824
6886
if (!$confirmFlag -OR $pscmdlet.ShouldProcess($farmList.$item)) {
6825
6887
$farm_service_helper.Farm_ScheduleMaintenance($services, $item, $spec)
0 commit comments