Merge pull request #171 from Magneet/master
replaced return of vcenter vm id's
This commit is contained in:
@@ -309,7 +309,7 @@ The Add-HVDesktop adds virtual machines to already exiting pools by using view A
|
|||||||
if (!$confirmFlag -OR $pscmdlet.ShouldProcess($machines)) {
|
if (!$confirmFlag -OR $pscmdlet.ShouldProcess($machines)) {
|
||||||
$desktop_service_helper.Desktop_AddMachinesToManualDesktop($services,$id,$machineList)
|
$desktop_service_helper.Desktop_AddMachinesToManualDesktop($services,$id,$machineList)
|
||||||
}
|
}
|
||||||
return $machineList
|
write-host "Successfully added desktop(s) to pool"
|
||||||
}
|
}
|
||||||
default {
|
default {
|
||||||
Write-Error "Only Automated/Manual pool types support this add operation"
|
Write-Error "Only Automated/Manual pool types support this add operation"
|
||||||
@@ -448,7 +448,7 @@ function Add-HVRDSServer {
|
|||||||
if (!$confirmFlag -OR $pscmdlet.ShouldProcess($rdsServers)) {
|
if (!$confirmFlag -OR $pscmdlet.ShouldProcess($rdsServers)) {
|
||||||
$farm_service_helper.Farm_AddRDSServers($services, $id, $serverList)
|
$farm_service_helper.Farm_AddRDSServers($services, $id, $serverList)
|
||||||
}
|
}
|
||||||
return $serverList
|
write-host "Successfully added RDS Server(s) to Farm"
|
||||||
} catch {
|
} catch {
|
||||||
Write-Error "Failed to Add RDS Server to Farm with error: $_"
|
Write-Error "Failed to Add RDS Server to Farm with error: $_"
|
||||||
break
|
break
|
||||||
@@ -9233,10 +9233,10 @@ $query_service_helper = New-Object VMware.Hv.GlobalSessionQueryServiceService
|
|||||||
$query=new-object vmware.hv.GlobalSessionQueryServiceQuerySpec
|
$query=new-object vmware.hv.GlobalSessionQueryServiceQuerySpec
|
||||||
|
|
||||||
$SessionList = @()
|
$SessionList = @()
|
||||||
$GetNext = $false
|
|
||||||
foreach ($pod in $services.Pod.Pod_List()) {
|
foreach ($pod in $services.Pod.Pod_List()) {
|
||||||
$query.pod=$pod.id
|
$query.pod=$pod.id
|
||||||
$queryResults = $query_service_helper.GlobalSessionQueryService_QueryWithSpec($services, $query)
|
$queryResults = $query_service_helper.GlobalSessionQueryService_QueryWithSpec($services, $query)
|
||||||
|
$GetNext = $false
|
||||||
do {
|
do {
|
||||||
if ($GetNext) { $queryResults = $query_service_helper.GlobalSessionQueryService_GetNext($services, $queryResults.id) }
|
if ($GetNext) { $queryResults = $query_service_helper.GlobalSessionQueryService_GetNext($services, $queryResults.id) }
|
||||||
$SessionList += $queryResults.results
|
$SessionList += $queryResults.results
|
||||||
|
|||||||
Reference in New Issue
Block a user