Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-OMEReport bug #7

Closed
EugenStelea opened this issue Dec 7, 2022 · 12 comments
Closed

Invoke-OMEReport bug #7

EugenStelea opened this issue Dec 7, 2022 · 12 comments

Comments

@EugenStelea
Copy link

There is a bug in the Invoke-OMEReport command.
Data is being retrieved, but the headers are mixed up.
See the attached screenshots.
Invoke-OMEReport_PowerShell
Invoke-OMEReport_OME

@TrevorSquillario
Copy link
Collaborator

I had this fixed a while back, just never got around to pushing a release. 3.1.0 should contain the fix!

@EugenStelea
Copy link
Author

Thank you!
Looking forward for the new release!

@cah-joe-lumley
Copy link

I'm using 3.2.0 and still experiencing this bug.

@TrevorSquillario
Copy link
Collaborator

Alright, I'll take a look at this one again

@cah-joe-lumley
Copy link

Alright, I'll take a look at this one again

Thanks. It can be re-created by creating a report and then editing the report to change column order.

@cah-joe-lumley
Copy link

Looks like its still an issue.

I believe this is happening because the FormatOutput-Info function is sorting ColumnNames by Sequence and it should not because the ResultRows are not returned from OME in this order. The ResultRows are returned in the same order as the ColumnNames.

When I remove 'Sort-Object Sequence' it provides results as expected.

@TrevorSquillario
Copy link
Collaborator

Am I missing something here? It's honoring the Column Order on the Report Definition screen.

2023-01-20 09_01_48-OpenManage Enterprise
2023-01-20 09_01_22-OpenManage Enterprise

@TrevorSquillario
Copy link
Collaborator

TrevorSquillario commented Jan 20, 2023

The fields listed on the Reports page doesn't show the Column Order properly. This is the way OME works it seems.

2023-01-20 09_04_29-OpenManage Enterprise

@cah-joe-lumley
Copy link

Try adding some columns to your existing report. Such as Hostname, Operating System Name, and OS Version. Then Save and try invoke-omereport.

This is what I see after doing that:

- Mismatch results from the invoke-omereport
Device Service Tag :
Device Model : Dell HBA355i Fnt
Hostname : <removed_device_name>
Operating System Name : <removed_device_service_tag>
OS Version : VxRail E660F
RAID Controller Manufacturer : <removed_hostname>
RAID Controller Name : VMware ESXi
Device Name : 7.0.3 Update 3 Patch 35 (build-19482537) Kernel 7.0.3 (x86_64)

- Results from ReportResults
{"@odata.context":"/api/$metadata#ReportService.ReportResult","@odata.type":"#ReportService.ReportResult","@odata.id":"/api/ReportService/ReportDefs(46305)/ReportResults","Id":84,"Title":"perc","TaskId":46300,"ResultRowColumns":[{"Id":869,"Name":"RAID Controller Manufacturer","Width":20.0,"Sequence":5},{"Id":870,"Name":"RAID Controller Name","Width":20.0,"Sequence":6},{"Id":871,"Name":"Device Name","Width":20.0,"Sequence":7},{"Id":872,"Name":"Device Service Tag","Width":20.0,"Sequence":0},{"Id":873,"Name":"Device Model","Width":20.0,"Sequence":1},{"Id":874,"Name":"Hostname","Width":20.0,"Sequence":2},{"Id":875,"Name":"Operating System Name","Width":20.0,"Sequence":3},{"Id":876,"Name":"OS Version","Width":20.0,"Sequence":4}],"ResultRows@odata.navigationLink":"/api/ReportService/ReportDefs(46305)/ReportResults/ResultRows"}

- Results from ReportResults/ResultsRow
{"@odata.context":"/api/$metadata#Collection(ReportService.ReportResultRow)","@odata.count":886,"value":[{"@odata.type":"#ReportService.ReportResultRow","Values":[" ","Dell HBA355i Fnt","<removed_device_name>","<removed_device_service_tag>","VxRail E660F","<removed_hostname>","VMware ESXi","7.0.3 Update 3 Patch 35 (build-19482537) Kernel 7.0.3 (x86_64)"]}],"@odata.nextLink":"/api/ReportService/ReportDefs(46305)/ReportResults/ResultRows?$skip=1&$top=1"}

@TrevorSquillario
Copy link
Collaborator

What version of PowerShell are you using? I am seeing some differences between PS 5 and PS 7.

@TrevorSquillario
Copy link
Collaborator

Alright, I see what you're saying. Removed Sort-Object Sequence and it all matches up.

@TrevorSquillario
Copy link
Collaborator

Published 3.3.1 that includes this fix. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants