title: How can I check if any member of an array is greater than 9000
body: <p>I need to make a script which takes action, if one member of the entire array is greater than 9000.</p>
  
  <pre><code>$all = 1,10,999,1990,2002,9101,5000,12,500
      foreach($cauta in $all){
          if($cauta -gt 7000){
              Send-MailMessage -To me@myemail.com -From alert@myemail.com -Subject "CRITICAL load" 
          }
          else{
              Send-MailMessage -To me@myemail.com -From alert@myemail.com -Subject "OK load" 
          }
  }
  </code></pre>
  
  <p>The problem is, with this foreach, it sends me emails continuously.
  I need to receive an email with "OK" or "CRITICAL" status:
  If one of the array members is greater than 9000 -> send one email with critical status.
  If all members of the array are below 9000 -> send one email with ok status.</p>