From 38baff0d311865409b6d1af67d0afbdab9997b52 Mon Sep 17 00:00:00 2001 From: William Lam Date: Wed, 1 Feb 2017 12:21:09 -0800 Subject: [PATCH] Using pscustomobject to keep ordering --- Modules/VAMI.psm1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/VAMI.psm1 b/Modules/VAMI.psm1 index cc8e92e..6b80497 100755 --- a/Modules/VAMI.psm1 +++ b/Modules/VAMI.psm1 @@ -24,7 +24,7 @@ $ts = [timespan]::fromseconds($systemUptimeAPI.get().toString()) $uptime = $ts.ToString("hh\:mm\:ss\,fff") - $summaryResult = New-Object PSObject -Property @{ + $summaryResult = [pscustomobject] @{ Product = $results.product; Type = $results.type; Version = $results.version; @@ -71,7 +71,7 @@ Function Get-VAMIHealth { } $healthSoftwareUpdates = (Get-CisService -Name 'com.vmware.appliance.health.softwarepackages').get() - $healthResult = New-Object PSObject -Property @{ + $healthResult = [pscustomobject] @{ HealthOverall = $healthOverall; HealthLastCheck = $healthLastCheck; HealthCPU = $healthCPU; @@ -142,7 +142,7 @@ Function Get-VAMITime { $timeSync = (Get-CisService -Name 'com.vmware.appliance.techpreview.timesync').get() $timeSyncMode = $timeSync.mode - $timeResult = New-Object PSObject -Property @{ + $timeResult = [pscustomobject] @{ Timezone = $timeResults.timezone; Date = $timeResults.date; CurrentTime = $timeResults.time; @@ -193,7 +193,7 @@ Function Get-VAMINetwork { $spec+= $interface.name $ipv4result = $ipv4API.get($spec) - $interfaceResult = New-Object PSObject -Property @{ + $interfaceResult = [pscustomobject] @{ Inteface = $interface.name; MAC = $interface.mac; Status = $interface.status;