getnext placed on the wrong spot

This commit is contained in:
Wouter Kursten
2018-03-03 10:23:22 +01:00
committed by GitHub
parent cda9bd36e1
commit 9282c79c86

View File

@@ -9198,10 +9198,10 @@ $query_service_helper = New-Object VMware.Hv.GlobalSessionQueryServiceService
$query=new-object vmware.hv.GlobalSessionQueryServiceQuerySpec
$SessionList = @()
$GetNext = $false
foreach ($pod in $services.Pod.Pod_List()) {
$query.pod=$pod.id
$queryResults = $query_service_helper.GlobalSessionQueryService_QueryWithSpec($services, $query)
$GetNext = $false
do {
if ($GetNext) { $queryResults = $query_service_helper.GlobalSessionQueryService_GetNext($services, $queryResults.id) }
$SessionList += $queryResults.results