loop until user enters one of three required letters
<p>Currently I have this:</p>

<pre><code>do {
  $MAB = Read-Host "Do you require a Mandatory and/or Advertised deployment? (M)andatory, (A)dvertised, (B)oth"
} while ($MAB -ne "M","A","B")
</code></pre>

<p>But it isn't working for me.</p>

<p>What I need it to do is request the user if they want an Advertised, Mandatory or Both, and depending on what they need they type in M for Mandatory, A for Advertised or B for Both.</p>

<p>At the moment, using what I have above if I put in any of the 3 letters it just asks again.</p>

<p>If I set it up like this though:</p>

<pre><code>do {
  $MAB = Read-Host "Do you require a Mandatory and/or Advertised deployment? (M)andatory, (A)dvertised, (B)oth"
} while ($MAB -ne "M")
</code></pre>

<p>It works fine, although that doesn't help me for the A or B inputs.</p>

<p>Also if you could explain how I can throw an error saying "You must enter either A for Advertised, B for Both, or M for Mandatory, to proceed." If they put in anything other than a M, A, or B.</p>