Hello,
Does anyone have a simple script to share that lists the VMs and their tools version/state, but also based on a tag?
We only look after a a group of VMs based on a tag called 'dev' for example.
Thanks
Hi @G0nz0UK ,
Take a look at @LucD 's post on Get VMs with Tag...
You can add the VMTools Version to that code very easily.
@G0nz0UK , I'm going to correct one mistake I had and switch the code slightly. Try this:
Instead of using the costly (in execution time) Get-TagAssignment, you can use the Tag parameter on the Get-VM cmdlet.
Get-VM -Tag (Get-Tag -Name 'dev' ) |
Select Name,
@{N='VMware Tools State';E={$_.ExtensionData.Guest.ToolsStatus}},
@{N='VMware Tools Version';E={$_.ExtensionData.Guest.ToolsVersion}} |
Export-Csv -Path .\report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference