Automation

 View Only
  • 1.  Wildcards in get-view

    Posted Jun 22, 2012 12:55 PM

    Does anyone have details on how to use wildcards with the get-view commandlet?

    e.g.

    get-view -viewtype virtualmachine -filter @{"Name" = "server*"}

    where I want to return all vms with beginning with the name server

    This doesn't work but I'm sure there is some syntax available to make this work



  • 2.  RE: Wildcards in get-view
    Best Answer

    Posted Jun 22, 2012 01:31 PM

    In the Get-View filter you can use a set of regex expressions

    get-view -viewtype virtualmachine -filter @{"Name" = "^server"}

    This will resturn every virtualmachine whose name starts with "server".

    In VMware PowerCLI and Get-View filters you'll find some more info.



  • 3.  RE: Wildcards in get-view

    Posted Jun 22, 2012 01:44 PM

    Thanks a bunch