title: Remove Duplicates within an array element in Powershell
body: <p>How can I remove duplicate values within an array element in PowerShell?</p>
  <p>For example:</p>
  <pre><code>$array[0] = C1 C1 C3 C3
  $array[1] = C1 C1 C2 C2
  </code></pre>
  <p>How can I removed the duplicates in Powershell, so that I have:</p>
  <pre><code>$array[0] = C1 C3
  $array[1] = C1 C2
  </code></pre>
  <p>I tried <code>$array[0] | Select -Unique</code> but it was not successful. Nothing changed. With <code>$array | Select - Unique</code> the duplicates are removed without considering the single array elements.</p>
  <p>Anyone a good idea?</p>