alanrenouf / vCheck-vSphere

vCheck Daily Report for vSphere
MIT License
732 stars 326 forks source link

What Makes The PSObject In Each Plugin Display #724

Open MasterChiefJon opened 3 years ago

MasterChiefJon commented 3 years ago

This is not a problem, just a question about how it works. I noticed that the various plug-ins (e.g., 76 VM Network State.ps1) create a PSObject and populate it with data. But the plug-in never displays the results collected in that PSObject. That information is displayed in the report. So what actually "displays" the data from the plug-in's PSObject?

jimmy58663 commented 1 year ago

In the vCheck.ps1 file around line 930ish the plugin gets called with all output being saved to $Details $TTR = [math]::round((Measure-Command { $Details = @(. $_.FullName)}).TotalSeconds, 2). That gets added to a PSObject with other things shortly after and put into the array $PluginResult.

A little further down around line 1010ish the display for the plugins get parsed and set up by Get-HTMLList, Get-HTMLTable, or Get-HTMLChart. Which one is used depends on the plugin information $Display.