Automation

 View Only
  • 1.  get-view service instance + connected to multiple servers

    Posted Jul 28, 2010 06:31 AM

    I am struggeling with a bit of logic in my postinstall script for ESXi.

    I connect to vcenter to get the license for ESX, then i want to apply that license to the ESX host.

    However i issue another connect-viserver -server <esxhost>, to set the license, because you need a connection to the ESX host directly.

    To use the get-view ServiceInstance does not work properly when i am connected to vCenter already.

    Who has a solution?



  • 2.  RE: get-view service instance + connected to multiple servers

    Posted Jul 28, 2010 06:35 AM

    I suspect you're using multi-mode ?

    Can't you solve that by using the -Server parameter on the Get-View cmdlet?

    Like this

    Get-View ServiceInstance -Server $DefaultVIServer
    

    for example.

    ____________

    Blog: LucD notes

    Twitter: lucd22



  • 3.  RE: get-view service instance + connected to multiple servers

    Posted Jul 28, 2010 06:41 AM

    On the multi mode option, i haven't looked into that yet.

    I will test your snippet and have a look if it works.



  • 4.  RE: get-view service instance + connected to multiple servers

    Posted Jul 28, 2010 08:34 AM

    That works, not to get the update license task to work.