Closed cwiley2566 closed 7 years ago
hmmmm can you attach a copy of the report?
What do you have $TimeToRun and $reportOnPlugins set to? If they are $true, this is probably the cause. Might need to exclude these from counting towards an empty report...
I thought that too but I set them to false:
$reportOnPlugins = $false
$ListEnabledPluginsFirst = $false
$TimeToRun = $false
$PluginSeconds = 30
A screen shot of the report is attached.
hmmm interesting!
Maybe try exporting the $PluginResult variable so we can see why it is setting $emptyReport to $false (which should only happen if there is at least one result in $PluginResult that has some output from a plugin). Add $pluginReport | Export-Clixml ./PluginResult.xml
to the start of the output section around line 820.
Then we can Import-Clixml .\PluginResult.xml
and see what is in the variable...
Out of interest, what version of Powershell are you running? From memory PS2.0 and lower had some quirky behavior with foreach loops, which would always iterate once even on an empty variable...though $Plugin.Details should still be false...
Here is the contents of the file
Yeah interesting, the result is null...maybe we can try an additional check.
What version of Powershell are you using?
Powershell = 4.0 VMware vSphere PowerCLI 6.3 Release 1 build 3737840 vCheck = 6.23
OK, I worked out what is causing this.
The connection plugin is returning the status messages as content, so technically the plugin has content even if it isn't displayed.
I've pushed a fix to the dev branch
Ok thanks very much!!
Hello,
I am still encountering it, despite using vCheck v6.25. Also: PowerShell = 5.1.15063.786 PowerCLI = 6.5.3 build 6826660
As a workaround I have commented out all Write-CustomOut lines in the "00 Connection Plugin for vCenter.ps1", which ceased the unnecessary output in that plugin. It seems that those are going into $PluginResult.Details for some reason.
I set email report even if its blank to false but I still get an email? Am I missing something?
Send the report by e-mail even if it is empty?
$EmailReportEvenIfEmpty = $false