remove reporting array and sort

This commit is contained in:
Markus Kraus
2020-05-07 20:42:54 +02:00
parent f53c09ae03
commit ca6f6abeb7

View File

@@ -31,7 +31,7 @@ function Get-VMHostUplinkDetails {
Get-VMHost -Name MyHost | Get-VMHostUplinkDetails -Type LLDP | Where-Object {$_.VDS -ne "-No Backing-"} | Format-Table -AutoSize Get-VMHost -Name MyHost | Get-VMHostUplinkDetails -Type LLDP | Where-Object {$_.VDS -ne "-No Backing-"} | Format-Table -AutoSize
.Example .Example
Get-VMHost -Name MyHost | Get-VMHostUplinkDetails -Type CDP | Where-Object {$_.VDS -ne "-No Backing-"} | Format-Table -AutoSize Get-VMHost -Name MyHost | Get-VMHostUplinkDetails -Type CDP | Where-Object {$_.VDS -ne "-No Backing-"} | Sort-Object ClusterName, HostName, vmnic | Format-Table -AutoSize
.Example .Example
Get-Cluster -Name MyCluster | Get-VMHost | Get-VMHostUplinkDetails -Type LLDP | Format-Table -AutoSize Get-Cluster -Name MyCluster | Get-VMHost | Get-VMHostUplinkDetails -Type LLDP | Format-Table -AutoSize
@@ -137,16 +137,8 @@ Begin {
Process { Process {
$MyView = @() $VMHost | Foreach-Object { Write-Output (Get-Info $_) }
}
foreach ($myHost in $VMhost) {
$Info = Get-Info $myHost
$MyView += $Info
}
$MyView | Sort-Object ClusterName, HostName, vmnic
}
} }