What about performance optimizations for large queries that leverage Invoke-Command to minimize the data returned?
To give an example: we have a number of customers relying on custom-built MIM solution for syncing different tenants, and in some cases (e.g. periodic full import) we query a lot of objects (think -ResultSize Unlimited), but since we need only a small subset of all properties, performance is tweaked by piping this (server-side) to Select-Object. So code looks something like this:
Invoke-Command -Session $RPSSession -Scriptblock {Get-MailContact -ResultSize Unlimited | Select-Object -Property id, alias, EmailAddresses, ExternalEmailAddress, DisplayName}
For large tenants, this is a lot faster and consumes a lot less bandwidth and memory than fetching all properties, then selecting the ones we're interested in client-side. Can the same be achieved using REST calls?
Or is it an option to add a -Properties parameter to selected cmdlets (similar to -Properties in e.g. Get-ADUser) so we limit what is returned?