I am exporting data to a csv and for some reason the @{} are transferring over. Here is a sample script.
Get-VM VM | Select Name, @{N="DSFree";E={$_ | Get-Datastore | Select FreeSpaceMB }} | Export-Csv c:\temp\info.csv
The output of the DSFree column looks like this: @{FreeSpaceMB=686704}
How can I stop the @{} from exporting?
Thanks in advance.
I can’t try your specific example, but typically -ExpandProperty is the answer: