VMware Cloud Community
Opt_1
Contributor
Contributor
Jump to solution

VMTools

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

Tags (1)
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

5 Replies
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
Opt_1
Contributor
Contributor
Jump to solution

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

0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Opt_1
Contributor
Contributor
Jump to solution

LucD,

Excellent

This is exactly what I need

I would like to thank you for your time and expertise

Cheers

0 Kudos