title: Union and Intersection in PowerShell?
body: <p>I have an array of objects of the following structure:</p>
  
  <pre><code>structure Disk
  {
    int UID;
    String Computer;
  }
  </code></pre>
  
  <p>A computer may have a bunch of shared disks, and a disk may be shared among computers.</p>
  
  <p>I want to find out all the disks common to all the computers. For example, I have computer A, B, and C; Disks 1, 2, and 3.
  The disk array is {1,A}, {1,B}, {2,A},{2,B},{2,C},{3,A}.
  The result that I want should be the disk 2, because it appears on A, B, and C.</p>
  
  <p>Is there a effective way to achieve this?</p>
  
  <p>With multiple foreach loops it's achievable, but definitely I want a better way. I'm thinking about operations like intersection, but didn't find this in PowerShell.</p>