Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

convert a list in a column to a single csv row

$
0
0

Hi All,

I am trying to transpose an output from powershell, using a command on Hyper-V SCVMM. The command is:

Text
Get-VM | Select-Object name | ft -HideTableHeaders

...and the output I get is as follows:

VM1

VM2

VM3

I would like to transpose this list to:

"VM1","VM2","VM3"

If anyone is aware of a way to do this, I would appreciate it.

Many thanks


Viewing all articles
Browse latest Browse all 15370


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