when i run this script it runs without errors but its not what i expected i want to format the VM column as mention in the script
Note:-when i run this script without ConverTo-HTML the Formatting is applied as in the script
is there any way of solving this plz help
The output of Format-* cmdlets cannot be consumed by anything but Out-File, Out-String, Out-Printer, and Out-Host. This is a common mistake, as described in "The Big Book of PowerShell Gotchas" (powershell.org/wp/ebooks). I suggest reviewing that (it's a free book).
Consider using Select-Object instead. You will need to remove the FormatString and Align directives, as Select-Object does not support those.
Thanks for the help and recommendation
Have a nice day
You must be logged in to reply to this topic.