My first variables, is someting like:
name OS version
---- ----
kead windows 2019
hanacockpit SLES12SP3
My second variables, is like
name GB
---- ----
kead 54.081582998856902122497558594
hanacockpit 384.20552698988467454910278320
As you can see the first column is name
, as long as the second one has the same name,let's say kead
,Join GB
accordingly.
The final output is
name OS version GB
---- ---- ---
kead windows 2019 54.081582998856902122497558594
hanacockpit SLES12SP3 384.20552698988467454910278320
Anyway to do it?
Actually, variable1 and variable2 are from ESXI powercli.
# skip connection.
$all=Get-VM |
Get-View -Property @("Name", "config.GuestFullName") |
Select -Property Name,
@{N="OS";E={$_.Config.GuestFullName}}
$space =get-vm | Select Name,@{N="disk-size";E= {@([math]::Round($_.ProvisionedSpaceGB / 1))}}