title: Powershell creating an array from a csv of column A based on contents of column B
body: <p>I have a csv file that contains a host of columns but only 2 are relevant: "Emails" and "Followup".
  The Emails column contains a list of email addresses, and Followup contains either Y's or N's; I have 1 Y and 7 N's.
  I'm working with a header row and then 8 rows of data.</p>
  
  <p>So far, I have this script: </p>
  
  <pre><code>$File = Import-Csv -Path "C:\file.csv"
  $Addresses = @($File.email)
  $Followup = @($File.followup)
  $To = @($Addresses | Where-Object {$Followup -eq "Y"})
  
  $Addresses
  $Followup
  $To
  </code></pre>
  
  <p>I'm trying to create another array ($To) that contains only those email addresses that are paired with a "Y" in the Followup column.</p>
  
  <p>For my output, I'm getting 8 email addresses (good), 7 N's and 1 Y (good), and 8 email addresses again (bad, desired outcome is 1).</p>
  
  <p>What am I fouling up here?</p>