title: PowerShell Suppress Output
body: <p>I've checked and tried a few of the suggestions on StackOverflow but none of them seem to work.  I put together an example of what I am trying to accomplish.</p>
  
  <pre><code>[System.Random] $rand = New-Object System.Random
  $randomNumbers = New-Object int[] 10;
  [int[]] $randomNumbers;
  for($i = 0; $i -lt $randomNumbers.Length; $i++)
  {
      ($randomNumbers[$i] = $rand.Next(256)) 2&gt;&amp;1 | Out-Null;
  }
  </code></pre>
  
  <p>I've tried the </p>
  
  <pre><code>&gt; $Null
  |Out-Null
  2&gt;&amp;1
  </code></pre>
  
  <p>But none of them seem to suppress the output.  It's showing 10 zero's in a row.  One for each assignment.  How can I suppress that output?</p>