From eb1b9a1947a267def6177c4d0e19b10f70ffb26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20SCHITZ?= Date: Mon, 14 Mar 2022 14:33:17 +0100 Subject: [PATCH] Update ViOfflineInventory.ps1 --- opt/sexigraf/ViOfflineInventory.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opt/sexigraf/ViOfflineInventory.ps1 b/opt/sexigraf/ViOfflineInventory.ps1 index f3f9cae6..93eb6313 100644 --- a/opt/sexigraf/ViOfflineInventory.ps1 +++ b/opt/sexigraf/ViOfflineInventory.ps1 @@ -3,7 +3,7 @@ param([Parameter (Mandatory=$true)] [string] $CredStore) -$ScriptVersion = "0.9.58" +$ScriptVersion = "0.9.59" $ErrorActionPreference = "SilentlyContinue" $WarningPreference = "SilentlyContinue" @@ -253,7 +253,7 @@ if ($ViServersList.count -gt 0) { Write-Host "$((Get-Date).ToString("o")) [WARN] Unable to get blue folder path for $($Vm.name)" } - $ViVmInfo = "" | Select-Object vCenter, VM, ESX, Cluster, IP, PortGroup, CommittedGB, MAC, GuestId, vCPU, vRAM, vmxPath, Folder + $ViVmInfo = "" | Select-Object vCenter, VM, ESX, Cluster, IP, PortGroup, CommittedGB, AllocatedGB, MAC, GuestId, vCPU, vRAM, vmxPath, Folder $ViVmInfo.vCenter = $ServerConnection.name $ViVmInfo.VM = $Vm.name @@ -262,6 +262,7 @@ if ($ViServersList.count -gt 0) { $ViVmInfo.IP = $VmIpAddress $ViVmInfo.PortGroup = $VmNet -join " ; " $ViVmInfo.CommittedGB = [math]::round($Vm.Summary.Storage.committed/1GB,1) + $ViVmInfo.AllocatedGB = [math]::round(($Vm.Summary.Storage.Committed + $Vm.Summary.Storage.Uncommitted)/1GB,1) $ViVmInfo.MAC = ($Vm.Config.Hardware.Device|?{$_.MacAddress}).MacAddress -join " ; " $ViVmInfo.GuestId = $VmGuestId $ViVmInfo.vCPU = $Vm.Config.Hardware.NumCPU