Powershell menu , multiple choice (cli)

Welcome Forums General PowerShell Q&A Powershell menu , multiple choice (cli)

This topic contains 4 replies, has 3 voices, and was last updated by

 
Participant
4 years, 8 months ago.

  • Author
    Posts
  • #15241

    Participant
    Points: 31
    Rank: Member

    Hi, I have using this script found at posh:
    http://poshcode.org/2893

    I am trying to figure out how to use the multiple choice parameter, but am not advanced enough in Powershell to figure out how to do this. Would someone please help?
    Thanks!

  • #15243

    Participant
    Points: 0
    Rank: Member

    The parameter $multiplechoice is a switch parameter, so in order to call this function with that enabled you would just add "-multiplechoice" to your command line.

    If the switch parameter is passed, the value of $multiplechoice is $true, if it is not, the value is $false

    I didn't mention the alternate syntax because I don't really see when it would be useful, but you can see more in the following article.

    http://blogs.technet.com/b/orchestrator/archive/2012/05/04/oit-quick-tip-using-powershell-switch-parameters-in-cli-activities.aspx

  • #15244

    Participant
    Points: 31
    Rank: Member

    Excellent thanks for making that clear. Would there be a way to have a checkbox (in my dreams?) to choose?
    Is there a simpler way for them to choose as opposed to choosing them individually?
    Thanks!

  • #15258

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

    You'd have to code all of that yourself.

    • #15259

      Participant
      Points: 31
      Rank: Member

      yep, just wondering if it's possible to do any kind of checkmarks...
      My limitation here is that I am working with Powershell for Web Access which does not allow popups.
      I will be attending TechMentor in Redmond in August, so I hope to be improving my skills 🙂

The topic ‘Powershell menu , multiple choice (cli)’ is closed to new replies.