Share via

what pagesize means for Get-MgBetaDeviceManagementVirtualEndpointCloudPc

Xu, Tao 45 Reputation points
2023-08-18T15:39:20.6233333+00:00

when use Get-MgBetaDeviceManagementVirtualEndpointCloudPc

how do you know what -pagesize you need ? where is it ?

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

Answer accepted by question author

Rich Matheisen 48,116 Reputation points
2023-08-18T15:52:11.3933333+00:00

The pagesize determines how many results are returned at one time. If the number of results is too large it can result in memory exhaustion on the machine doing the search, or in network traffic congestion, or query failure.

If the results won't fit in a single page, the remaining results will be returned in subsequent pages. This allows your client a chance to start processing the results before the search is complete. Additional pages will be filled and returned from the same query as needed.

This is where pipelining the results of the query is beneficial, rather than simply accumulating the entire set of results and then processing the data stored in the array once the query has finished.

The default is to attempt placing all the results in a single page. That might be appropriate for a reasonably small number of result but lead to failure if the data exceed the default (and unstated!) page size.

If in doubt, try starting with a page size of, say, 500.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.