Open dchosnek opened 1 year ago
This is bug due to the underlying properties type as object. we are working on it. We have workaround for the same
$test = Get-IntersightComputeRackUnit -Apply 'groupby((Model), aggregate($count as Total))' -Json
$testResult = $test | ConvertFrom-Json
$testResult.Results
The GroupBy/Aggregate operation of the API shown below works using the API explorer (return a list of all server models found in an Intersight account and the number of servers of each model). When attempting this same operation using the PowerShell SDK, a list of objects is returned that does not contain either model names or a count of the model names.
The operation does return the right number of objects, implying that "GroupBy" is working. But the contents of the objects are not useful.
To reproduce:
This is one of the objects returned when running the above command in my Intersight account. Again, the command returns seven objects like this and there are seven different models in my Intersight account.
Version used Intersight.PowerShell 1.0.9.6484 PowerShell 7.2.4
Expected behavior The API browser returns:
I would expect the PowerShell SDK to return something like: