If you're not yet using PowerShell v3, you can do it this way to get the order in the CSV file.
&{Get-View-ViewTypeVirtualMachine|%{
New-ObjectPSObject-Property@{
Name=$_.Name
Host=Get-View$_.Summary.Runtime.Host|Select-ExpandPropertyName
Cluster=Get-Cluster-VM$_.Name|Select-ExpandPropertyName
Datastores= [system.String]::Join(",",($_.Storage.PerDatastoreUsage|%{Get-View$_.Datastore} |%{$_.Name}))
ProvisionedGB= [math]::Round( ($_.Storage.PerDatastoreUsage|Measure-Object-PropertyCommitted-Sum|Select-ExpandPropertySum)/1GB,1)
NumCPU=$_.Config.Hardware.NumCPU
NumvCPU=&{if($_.Config.Hardware.NumCoresPerSocket-gt0){$_.Config.Hardware.NumCPU/$_.Config.Hardware.NumCoresPerSocket}}
DASStatus=&{if($_.Runtime.dasvmprotection.dasProtected){$_.Runtime.dasvmprotection.dasProtected}else{$false}}
}
}} |SelectName,Host,Cluster,Datastores,ProvisionedGB,NumCPU,NumvCPU,DASStatus|
Export-Csv"C:\Powershell\VM-report.csv"-NoTypeInformation-UseCulture
If you are using PowerShell v3, you can do
&{Get-View-ViewTypeVirtualMachine|%{
$object= [ordered]@{
Name=$_.Name
Host=Get-View$_.Summary.Runtime.Host|Select-ExpandPropertyName
Cluster=Get-Cluster-VM$_.Name|Select-ExpandPropertyName
Datastores= [system.String]::Join(",",($_.Storage.PerDatastoreUsage|%{Get-View$_.Datastore} |%{$_.Name}))
ProvisionedGB= [math]::Round( ($_.Storage.PerDatastoreUsage|Measure-Object-PropertyCommitted-Sum|Select-ExpandPropertySum)/1GB,1)
NumCPU=$_.Config.Hardware.NumCPU
NumvCPU=&{if($_.Config.Hardware.NumCoresPerSocket-gt0){$_.Config.Hardware.NumCPU/$_.Config.Hardware.NumCoresPerSocket}}
DASStatus=&{if($_.Runtime.dasvmprotection.dasProtected){$_.Runtime.dasvmprotection.dasProtected}else{$false}}
}
New-ObjectPSObject-Property$object
}} |Export-Csv"C:\VM-report.csv"-NoTypeInformation-UseCulture