Automation

 View Only
  • 1.  Using Get-LCMImage for a Particular VMTools version

    Posted Dec 04, 2023 03:31 AM

    Looking over PowerCLI documentation, trying to use Get-LCMImage to store a particular version of VMware Tools to a variable

    The following is a snippet from the manual 

    VMware PowerCLI User's Guide -

    Assyrian_0-1701660551886.png

    The following is the closest I've come after several attempts, takes a while to run but then comes back with an error

    PS C:\Windows\system32> $esxiCompToolsPackage = Get-LcmImage -Id 'Component-VMware Tools Async Release/12.3.5'
    
    Get-LcmImage : 12/3/2023 7:11:43 PM	Get-LcmImage		No vLCM image with id 'Component-VMware Tools Async Release/12.3.5' found.	
    At line:1 char:25
    + ... lsPackage = Get-LcmImage -Id 'Component-VMware Tools Async Release/12 ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (:) [Get-LcmImage], VimException
        + FullyQualifiedErrorId : ViCore_GetLcmImage_DoWork_IdNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.Lcm.GetLcmImage


  • 2.  RE: Using Get-LCMImage for a Particular VMTools version

    Posted Dec 04, 2023 04:25 AM

    Update..I got it to work by running the following command, why inputting the actual version number was not enough but required a wildcard

     

    $esxiCompToolsPackage = Get-LcmImage -Type Component -Version '*12.3.5'