Using pscustomobject to keep ordering

This commit is contained in:
William Lam
2017-02-01 12:21:09 -08:00
parent e210b2f229
commit 38baff0d31

View File

@@ -24,7 +24,7 @@
$ts = [timespan]::fromseconds($systemUptimeAPI.get().toString()) $ts = [timespan]::fromseconds($systemUptimeAPI.get().toString())
$uptime = $ts.ToString("hh\:mm\:ss\,fff") $uptime = $ts.ToString("hh\:mm\:ss\,fff")
$summaryResult = New-Object PSObject -Property @{ $summaryResult = [pscustomobject] @{
Product = $results.product; Product = $results.product;
Type = $results.type; Type = $results.type;
Version = $results.version; Version = $results.version;
@@ -71,7 +71,7 @@ Function Get-VAMIHealth {
} }
$healthSoftwareUpdates = (Get-CisService -Name 'com.vmware.appliance.health.softwarepackages').get() $healthSoftwareUpdates = (Get-CisService -Name 'com.vmware.appliance.health.softwarepackages').get()
$healthResult = New-Object PSObject -Property @{ $healthResult = [pscustomobject] @{
HealthOverall = $healthOverall; HealthOverall = $healthOverall;
HealthLastCheck = $healthLastCheck; HealthLastCheck = $healthLastCheck;
HealthCPU = $healthCPU; HealthCPU = $healthCPU;
@@ -142,7 +142,7 @@ Function Get-VAMITime {
$timeSync = (Get-CisService -Name 'com.vmware.appliance.techpreview.timesync').get() $timeSync = (Get-CisService -Name 'com.vmware.appliance.techpreview.timesync').get()
$timeSyncMode = $timeSync.mode $timeSyncMode = $timeSync.mode
$timeResult = New-Object PSObject -Property @{ $timeResult = [pscustomobject] @{
Timezone = $timeResults.timezone; Timezone = $timeResults.timezone;
Date = $timeResults.date; Date = $timeResults.date;
CurrentTime = $timeResults.time; CurrentTime = $timeResults.time;
@@ -193,7 +193,7 @@ Function Get-VAMINetwork {
$spec+= $interface.name $spec+= $interface.name
$ipv4result = $ipv4API.get($spec) $ipv4result = $ipv4API.get($spec)
$interfaceResult = New-Object PSObject -Property @{ $interfaceResult = [pscustomobject] @{
Inteface = $interface.name; Inteface = $interface.name;
MAC = $interface.mac; MAC = $interface.mac;
Status = $interface.status; Status = $interface.status;