Hello
Try to compile spreadsheet of VMs that have VMTools installed/updated/running and timestamp when tools have been modified.
Looking for advise/instructions on how this can be done quickly from powercli
Regards
Try like this
Get-VM |
Select @{N="VMName"; E={$_.Name}},
@{N='Cluster';E={Get-Cluster -VM $_ | Select -ExpandProperty Name}},
@{N='vCenter';E={$_.Uid.Split(':')[0].Split('@')[1]}},
@{N="HardwareVersion"; E={$_.Extensiondata.Config.Version}},
@{N="ToolsVersion"; E={$_.Extensiondata.Config.Tools.ToolsVersion}},
@{N="ToolsStatus"; E={$_.Extensiondata.Summary.Guest.ToolsStatus}},
@{N="ToolsVersionStatus"; E={$_.Extensiondata.Summary.Guest.ToolsVersionStatus}},
@{N="ToolsRunningStatus"; E={$_.Extensiondata.Summary.Guest.ToolsRunningStatus}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Start with this.
Not too sure how you could obtain the installation date though
Get-VM |
Select @{N="VMName"; E={$_.Name}},
@{N="HardwareVersion"; E={$_.Extensiondata.Config.Version}},
@{N="ToolsVersion"; E={$_.Extensiondata.Config.Tools.ToolsVersion}},
@{N="ToolsStatus"; E={$_.Extensiondata.Summary.Guest.ToolsStatus}},
@{N="ToolsVersionStatus"; E={$_.Extensiondata.Summary.Guest.ToolsVersionStatus}},
@{N="ToolsRunningStatus"; E={$_.Extensiondata.Summary.Guest.ToolsRunningStatus}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You could scan the vmware.log for each VM.
Otherwise it would have to be a query inside the guest OS (with Invoke-VMScript).
And you will have to take into account that many *nix systems come with the VMware Tools as guest managed.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
Your script is very helpful
I will run this script from PS and will connect to multiple vcenters
How vcenter server name and cluster can be added to each VM in csv file out?
Thank you so much for assistance
Try like this
Get-VM |
Select @{N="VMName"; E={$_.Name}},
@{N='Cluster';E={Get-Cluster -VM $_ | Select -ExpandProperty Name}},
@{N='vCenter';E={$_.Uid.Split(':')[0].Split('@')[1]}},
@{N="HardwareVersion"; E={$_.Extensiondata.Config.Version}},
@{N="ToolsVersion"; E={$_.Extensiondata.Config.Tools.ToolsVersion}},
@{N="ToolsStatus"; E={$_.Extensiondata.Summary.Guest.ToolsStatus}},
@{N="ToolsVersionStatus"; E={$_.Extensiondata.Summary.Guest.ToolsVersionStatus}},
@{N="ToolsRunningStatus"; E={$_.Extensiondata.Summary.Guest.ToolsRunningStatus}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD,
Excellent
This is exactly what I need
I would like to thank you for your time and expertise
Cheers