Hello,
ProvisionedSpaceGB". Like:
Get-VM | Select-Object Name,ProvisionedSpaceGB | Export-Csv-NoTypeInformation-UseCulturec:\temp\myVMInfo.csv
How does that do for you?
Instead of using Write-Host to write the output to the console, you would want to use the Select-Object cmdlet, so that you can then have output in the pipeline when it comes time for Export-Csv.
And, you can use the handy property of VirtualMachine objects, "ProvisionedSpaceGB". Like:
Get-VM | Select-Object Name,ProvisionedSpaceGB | Export-Csv-NoTypeInformation-UseCulturec:\temp\myVMInfo.csv
How does that do for you?