Skip to content

Commit

Permalink
Update ViOfflineInventory.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
rschitz committed Mar 14, 2022
1 parent 5f237d3 commit eb1b9a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions opt/sexigraf/ViOfflineInventory.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

param([Parameter (Mandatory=$true)] [string] $CredStore)

$ScriptVersion = "0.9.58"
$ScriptVersion = "0.9.59"

$ErrorActionPreference = "SilentlyContinue"
$WarningPreference = "SilentlyContinue"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit eb1b9a1

Please sign in to comment.