title: PowerShell Import-CSV, For Each Item, Delete String After Symbol
body: <p>If you have a list like this:</p>
  
  <pre><code>User1.XXXX
  User2.XXXXX
  User3.XXX
  </code></pre>
  
  <p>How can you create a for each loop and delete everything after the period? Also how do you delete everything before as well? I only have the basics written, and tried a few misguided attempts manipulating it with .substring etc...:</p>
  
  <pre><code>$allUsers = Import-Csv -path "c:\Folder1\All User.csv"
  $allUsers | foreach {
  
  } | Export-Csv -Path "c:\Folder1\Removed.csv"
  </code></pre>