Automation

 View Only
  • 1.  Add security tag to a new vm in NSX-T with powershell

    Posted Sep 08, 2021 09:23 AM

    Hi all,

    I found a nice powershell script (https://www.vrealize.it/2019/12/22/add-or-remove-tags-in-nsx-t-with-powercli/) But I run into the problem of the limit of "1000" I see with ($vmdata.help.list) that the page_size is default 1000. Does anyone have a solution for this so that the list returns more than 1000?



  • 2.  RE: Add security tag to a new vm in NSX-T with powershell
    Best Answer

    Posted Sep 08, 2021 08:48 PM

    Since the post hasn't been updated since it was published, I suspect the author didn't get an answer.
    Why don't you ask the question as a Reply on that blog post?



  • 3.  RE: Add security tag to a new vm in NSX-T with powershell

    Posted Sep 09, 2021 01:41 PM

    Based on the API doc, page size is limited to 1000. https://vdc-download.vmware.com/vmwb-repository/dcr-public/d6de7a5e-636f-4677-8dbd-6f4ba91fa5e0/36b4881c-41cd-4c46-81d1-b2ca3a6c693b/api_includes/method_ListAllVirtualMachines.html

    Unfortunately, I don't see anyway that you could get a filtered list from this api endpoint in particular.  Weird that they would limit it to 1000.  Seems like an oversight, but depending on what you are trying to accomplish from this particular call, there might be another way.

    What is it that you are trying to do exactly   ?  



  • 4.  RE: Add security tag to a new vm in NSX-T with powershell

    Posted Sep 10, 2021 09:00 AM

    Hi,  

    I want to set a security tag(s) (NSX-T) on a new created VM. The new VM is created with a Powershell script.

     

     

     

     



  • 5.  RE: Add security tag to a new vm in NSX-T with powershell
    Best Answer

    Posted Sep 10, 2021 03:31 PM


  • 6.  RE: Add security tag to a new vm in NSX-T with powershell
    Best Answer

    Posted Sep 20, 2021 01:35 PM