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
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
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
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 this Thanks for your help.
vmguy
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
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
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
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
LucD,
As always.Thanks for your help.
thanks
vmguy