VMware Cloud Community
COS
Expert
Expert
Jump to solution

Get-Datastore - format screen output as Tab Seperated Value (TSV)

My command below runs fine....

Get-Cluster BoateyMcBoateyFace | Get-Datastore

It get's me a list of all the datastores in that cluster "BoateyMcBoateyFace".

What I need is to format the output it gives me in a tab separated value on the screen. Not to a text file.

A little unorthadoxed from the norm but that's just me. (◔/‿\◔)

Also, if possible get it without the label headers. This will make it easier for me to parse through the output in Visual Studio.

Thanks in advanced.

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You mean like this?

Get-Cluster BoateyMcBoateyFace| Get-Datastore | Format-Table -HideTableHeaders


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

4 Replies
vijayrana968
Virtuoso
Virtuoso
Jump to solution

Why not to use select * and choose the specific values under output.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

You mean like this?

Get-Cluster BoateyMcBoateyFace| Get-Datastore | Format-Table -HideTableHeaders


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

COS
Expert
Expert
Jump to solution

That got me the stripped out header output I wanted.

Is it possible to format the output in Tab Separated Value?

The output now is padded with spaces.

Thanks

Reply
0 Kudos
COS
Expert
Expert
Jump to solution

I went ahead and wrote VB .Net code to parse out the data I needed.

Thanks

Reply
0 Kudos