Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 228309

Re: Trouble with populating the Get-VIEventPlus function into html code

$
0
0

Why don't you use the PowerShell ConvertTo-Html cmdlet to generate the html output? Remove the call to the writedata function from the code and change the line containing the last } into:

 

} | ConvertTo-Html


There are some things that don't work in your script. One thing is that in PowerShell you have to define a function before you use it. You called the writedata function before it was defined. That does not work.

 

Something else is that you used properties generated by the New-Object cmdlet as input for the writedata function. However at the location where you called writedata the current object in the pipeline is not the output of the New-Object cmdlet.

 

Message was edited by: Robert van den Nieuwendijk


Viewing all articles
Browse latest Browse all 228309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>