Added -ResourcePool to Set-HVPool
Update Set-HVPool to allow you to set a new resource pool within the same host/cluster
This commit is contained in:
BIN
Modules/VMware.Hv.Helper/.VMware.HV.Helper.psm1.swp
Normal file
BIN
Modules/VMware.Hv.Helper/.VMware.HV.Helper.psm1.swp
Normal file
Binary file not shown.
@@ -5941,6 +5941,10 @@ function Set-HVPool {
|
||||
[string]
|
||||
$globalEntitlement,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]
|
||||
$ResourcePool,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[boolean]$allowUsersToChooseProtocol,
|
||||
|
||||
@@ -6044,6 +6048,15 @@ function Set-HVPool {
|
||||
$updates += Get-MapEntry -key 'desktopSettings.displayProtocolSettings.enableHTMLAccess' -value $enableHTMLAccess
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey("ResourcePool")) {
|
||||
foreach ($item in $poolList.Keys) {
|
||||
$pool = Get-HVPool -PoolName $poolList.$item
|
||||
$ResourcePool_service_helper = New-Object VMware.Hv.ResourcePoolService
|
||||
$ResourcePoolID = Get-HVResourcePoolID $ResourcePool_service_helper.ResourcePool_GetResourcePoolTree($services, $pool.AutomatedDesktopData.VirtualCenterProvisioningSettings.VirtualCenterProvisioningData.HostOrCluster)
|
||||
$updates += Get-MapEntry -key 'automatedDesktopData.virtualCenterProvisioningSettings.virtualCenterProvisioningData.resourcePool' -value $ResourcePoolID
|
||||
}
|
||||
}
|
||||
|
||||
$info = $services.PodFederation.PodFederation_get()
|
||||
if ($globalEntitlement -and ("ENABLED" -eq $info.localPodStatus.status)) {
|
||||
$QueryFilterEquals = New-Object VMware.Hv.QueryFilterEquals
|
||||
|
||||
Reference in New Issue
Block a user