And apparently you will have to copy paste this to get it to be read easier? Attempt again:
$outputFile = "C:\Users\sloanejm-p\desktop\omg.csv"
$creds = Get-Credential $vCenter = Connect-VIServer rsrcnvc601hr -Credential $creds -SaveCredentials
$serviceInstance = Get-View ServiceInstance -Server $vCenter $perfMgr = Get-View $serviceInstance.Content.PerfManager -Server $vCenter
$counters = $perfMgr.PerfCounter
$metrics = @()
foreach ($counter in $counters) {
$metric = New-Object System.Object $metric | Add-Member -type NoteProperty -name GroupKey -value $counter.GroupInfo.Key $metric | Add-Member -type NoteProperty -name NameKey -value $counter.NameInfo.Key $metric | Add-Member -type NoteProperty -name Rolluptype -value $counter.RollupType $metric | Add-Member -type NoteProperty -name Level -value $counter.Level $metric | Add-Member -type NoteProperty -name FullName -value "$($counter.GroupInfo.Key).$($counter.NameInfo.Key).$($counter.RollupType)" $metric | Add-Member -type NoteProperty -name Summary -value $counter.NameInfo.Summary
$metrics += $metric }
$metrics | select fullname, level, summary | Export-Csv -NoTypeInformation $outputFile