title: how to go through a loop and match a number of strings
body: <p>I have the below that puts a number of registry keys into a kind of Array. I am trying to get my head around how do I look at each of these objects and decide that based on a specific string value of "en-US" or "de-DE", "it-IT" etc then find that string and execute a setup file.</p>
  
  <p>A server could have a number of languages installed and I want to ensure it goes through each language and installs a setup - once that is done then go back and look at it again and run another setup for a language that has not been touched by the script.</p>
  
  <hr>
  
  <p>UPDATE:</p>
  
  <p>Thanks for the answers so far and I have got the below that works. BUT I need to be able to write-host stating something like "Running Italian setup" and also use Start-Process? I am trying to use Start-process but I get an error:</p>
  
  <pre><code>$ItalianSpellingHotfix = "C:\Temp\IE11_Spelling_Hyphenation\IE-Spelling-it.msu"
  $langInstalled = Get-ChildItem -Path hklm:\System\CurrentControlSet\Control\MUI\UILanguages | Select -ExpandProperty PSChildName
  
  switch ($langInstalled)
  {
      {$_ -match "it-IT"} {start-process c:\windows\system32\wusa.exe $ItalianSpellingHotfix /quiet /norestart}
      #{$_ -match "de-DE"} {"Running German Setup"}
      #{$_ -match "en-US"} {"Running US English Setup"}
      #{$_ -match "es-ES"} {"Running Spanish Setup"}
  }
  </code></pre>
  
  <p>ERROR:</p>
  
  <pre><code>Start-Process : A positional parameter cannot be found that accepts argument '/quiet'.
  At line:9 char:26
  +     {$_ -match "it-IT"} {start-process c:\windows\system32\wusa.exe $ItalianSpel ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidArgument: (:) [Start-Process], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
  </code></pre>