Automation

 View Only
  • 1.  PowerCLI - get ViewComposer parameters ?

    Posted Feb 17, 2020 02:18 PM

    Hello,

    i need a way with PowerCLI to get 2 things about a VM :

         - the date of the last recompose 

         - the base image

    I can get it from the horizon server :

    (sorry it's in French).

    I'm using the hv.helper module, and the connection to the server is OK.


    I can get a VM, and display a lot of information :

    $nomVM = ”W7-Bureau-42”

    $vm = Get-View –viewtype VirtualMachine -filter @{“Name”=$nomVM}

    $vm.config

    but i'm unable to find what i need...

    Does someone know where i can find that ?

    Thank in advance !



  • 2.  RE: PowerCLI - get ViewComposer parameters ?
    Best Answer

    Posted Feb 17, 2020 02:53 PM

    You can try this!



  • 3.  RE: PowerCLI - get ViewComposer parameters ?

    Posted Feb 17, 2020 03:02 PM

    Wow, that's so simple i'm ashamed to lost so many time on it...

    juste modified few things, and it's perfect :

    $nomVM = ”W7-Bureau-09”

    $VM = Get-hvMachine -machinename $nomVM

    $vm.ManagedMachineData.ViewComposerData

    And in the ViewComposerData, i have exactly i want :

    Thank you very much ! :smileyhappy: