Nested dynamic parameters, argument completer?

Welcome Forums General PowerShell Q&A Nested dynamic parameters, argument completer?

This topic contains 1 reply, has 2 voices, and was last updated by

 
Keymaster
3 months, 3 weeks ago.

  • Author
    Posts
  • #105284

    Participant
    Points: 1
    Rank: Member

    Good day,
    I am working on a function to enable coworkers an easy method to install the azure site recovery agent, and enable replication.
    One problem I am stuck on is I would like to have a parameter in the function that queries azure for our subscriptions and returns the options. That was easy I thought use a dynamic param. However the next part is to list resource groups, vnets and subnets in a method they can also be chosen params. I thought argument completer but not sure on that either. Any suggestions are greatly appreciated.

    Thank you Jason

  • #105329

    Keymaster
    Points: 1,638
    Helping HandTeam Member
    Rank: Community Hero

    More dynamic parameters would do it, but you're going to engage a performance hit making all those queries. Auto-complete for parameter values gets REALLY complicated when one parameter depends on the value of another; that's why you don't see this kind of thing all that often.

The topic ‘Nested dynamic parameters, argument completer?’ is closed to new replies.