Automation

 View Only
  • 1.  VMTools

    Posted Jan 24, 2018 08:28 PM

    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



  • 2.  RE: VMTools

    Posted Jan 24, 2018 09:29 PM

    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}}



  • 3.  RE: VMTools

    Posted Jan 24, 2018 09:31 PM

    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.



  • 4.  RE: VMTools

    Posted Jan 24, 2018 09:57 PM

    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



  • 5.  RE: VMTools
    Best Answer

    Posted Jan 25, 2018 05:53 AM

    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}}



  • 6.  RE: VMTools

    Posted Jan 25, 2018 12:17 PM

    LucD,

    Excellent

    This is exactly what I need

    I would like to thank you for your time and expertise

    Cheers