VMware Cloud Community
vmhyperv
Contributor
Contributor
Jump to solution

VMware Tools Build no version

Hi Everyone,

       I want to pullout the list of VM with cluster name having old version of VMware tools (with Build no) which require to update.

Output in csv format.

thanks

vmguy

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Try something like this

&{foreach($cluster in Get-cluster ){
  Get-VM -Location $cluster |
 
where {$_.ExtensionData.Guest.ToolsVersionStatus -ne "guestToolsCurrent"} |
 
Select @{N="Cluster";E={$cluster.Name}},
    Name,
   
@{N="Tools Status";E={$_.ExtensionData.Guest.ToolsVersionStatus}},
   
@{N="Tools build";E={$_.ExtensionData.Guest.ToolsVersion}} }} | Export-Csv C:\report.csv -NoTypeInformation -UseCulture


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
7 Replies
LucD
Leadership
Leadership
Jump to solution

Try something like this

&{foreach($cluster in Get-cluster ){
  Get-VM -Location $cluster |
 
where {$_.ExtensionData.Guest.ToolsVersionStatus -ne "guestToolsCurrent"} |
 
Select @{N="Cluster";E={$cluster.Name}},
    Name,
   
@{N="Tools Status";E={$_.ExtensionData.Guest.ToolsVersionStatus}},
   
@{N="Tools build";E={$_.ExtensionData.Guest.ToolsVersion}} }} | Export-Csv C:\report.csv -NoTypeInformation -UseCulture


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
vmhyperv
Contributor
Contributor
Jump to solution

Thanks!! LucD
Can we ESXi Host Name too in this script.VMs sitting on Which ESXi host.Vm Hardware version if possible.Sorry for coming late for thisSmiley Wink Thanks for your help.

vmguy

0 Kudos
vmhyperv
Contributor
Contributor
Jump to solution

LucD,

   One question the script will give info like which vm guest need vmware tools upgrade ?

As per out put its shows with build no

Tools   Status
guestToolsNeedUpgrade
guestToolsNeedUpgrade
guestToolsNotInstalled
guestToolsNeedUpgrade
guestToolsNotInstalled
guestToolsNotInstalled

thanks

vmguy

0 Kudos
LucD
Leadership
Leadership
Jump to solution

This will give you the host as well

&{foreach($cluster in Get-cluster ){
  Get-VM -Location $cluster |  where {$_.ExtensionData.Guest.ToolsVersionStatus -ne "guestToolsCurrent"} |
 
Select @{N="Cluster";E={$cluster.Name}},
    @{N="ESX";E={$_.Host.Name}},
    Name,
   
@{N="Tools Status";E={$_.ExtensionData.Guest.ToolsVersionStatus}},
    @{N="Tools build";E={$_.ExtensionData.Guest.ToolsVersion}} }} | Export-Csv C:\report.csv -NoTypeInformation -UseCulture

Not sure what you mean with the build question. That column is in there.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

vmhyperv
Contributor
Contributor
Jump to solution

LucD,
  This will pull Vm Virtual HW version too ? I need urgently with those VM
require which VMware tools upgrade as well as were HW Version 7

thanks
vmguy

0 Kudos
LucD
Leadership
Leadership
Jump to solution

This includes the HW version

&{foreach($cluster in Get-cluster ){
  Get-VM -Location $cluster |  where {$_.ExtensionData.Guest.ToolsVersionStatus -ne "guestToolsCurrent"} |
  Select @{N="Cluster";E={$cluster.Name}},
    @{N="ESX";E={$_.Host.Name}},
    Name,Version,
    @{N="Tools Status";E={$_.ExtensionData.Guest.ToolsVersionStatus}},
    @{N="Tools build";E={$_.ExtensionData.Guest.ToolsVersion}} }} | Export-Csv C:\report.csv -NoTypeInformation -UseCulture


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

vmhyperv
Contributor
Contributor
Jump to solution

LucD,

   As always.Thanks for your help.

thanks

vmguy

0 Kudos