Hello,
In a script I use a messagbox to ask for Input.
This input wil be saved in a variable.
This variabele I like to convert to HTML, only when I look at the result in HTML
this is not making sense for me.
Hopefully someone can point out, what I need to change to make it work .
$msgBoxInput = [System.Windows.MessageBox]::Show( "Virtual Machine Host is managed at PBA ? `n",
'VMHost managed by PBA','YesNoCancel','QUESTION')
switch ($msgBoxInput) {
'Yes' {
## Do
$VMH = 'The Host of the VM is managed at PBA'
}
'No' {
## Do
$VMH = 'The Host of the VM is NOT managed at PBA'
}
'Cancel' {
## Do
$VMH = 'No answer was given '
}
}
#Convert VMHOST Information to HTML $VMH | ConvertTo-Html -as Table -PreContent "<h2> VHMOST Information</h2>" -Fragment
$VMHTML =$VMH | Convertto-HTML | out-file .\path\name.html
