When I run this command, it returns the output with lots of blank lines.
Get-Host | Select Name, Version | Format-List
I tried using ExpandProperty
but it still leaves me with one blank line at the end of the output, is there a way to remove the last blank line?
Get-Host | Select -ExpandProperty Name, Version | Format-List