I think there is something wrong with the following:
Function Report-Datastore {
$output = @()
Get-Datastore | % {$props = [ordered]@{'Name'=$_.Name;'UsedSpace'=[math]::Round(($_.CapacityGB - $_.FreeSpaceGB),2);'PercFree'=[math]::Round((100 * ($_.FreeSpaceGB/$_.CapacityGB)),0)}
$output += New-Object -TypeName PSCUstomObject -Property $props
}
$output
}