I need to update my hardware report for the newest version, 18. But its showing all v18 VMs as unknown.
$report = Get-VM | where { $_.ExtensionData.Config.Version -notmatch "vmx-18" } | Select Name, Version
Something like this you mean?
(Get-VM | where{$_.EXtensionData.Config.Version -ne 'vmx-18'}).Count
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The vmx-18 is not yet supported by PowerCLI, but you can use the ExtensionData.
Something like this for example
Get-VM | Group-Object -Property {$_.EXtensionData.Config.Version}
For each group, you can then list the VMs.
Like this for example
Get-VM |
Group-Object -Property {$_.EXtensionData.COnfig.Version} -PipelineVariable group |
ForEach-Object -Process {
New-Object -TypeName PSObject -Property ([ordered]@{
HWVersion = $group.Name -replace 'vmx-',''
VM = $group.Group.Name -join ','
})
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The report I look at shows how many VMs are not version 18, is there anyway to do that?
Something like this you mean?
(Get-VM | where{$_.EXtensionData.Config.Version -ne 'vmx-18'}).Count
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference