title: Split CSV-File by distinct UserId to seperate file
body: <p>I'm trying to split a csv-file By UserID</p>
  
  <pre><code>UserId;FirstName;LastName;Start;End;Type;BreakInMinutes;DateOfCreation;DateOfUpdate
  1206;Viktoria;Jechsmayr;2017-10-04 08:15:00.000;2017-10-04 16:15:00.000;work;30;04.10.2017 16:07;05.10.2017 12:31
  1205;Brigitte;Jechsmayr;2017-10-05 12:15:00.000;2017-10-05 16:15:00.000;work;0;05.10.2017 12:32;05.10.2017 16:15
  1207;Lisa;Jechsmayr;2017-10-06 08:40:00.000;2017-10-06 12:00:00.000;work;0;05.10.2017 15:51;06.10.2017 08:42
  1206;Viktoria;Jechsmayr;2017-10-09 08:25:00.000;2017-10-09 16:35:00.000;work;30;09.10.2017 08:23;09.10.2017 16:34
  1204;Karl;Jechsmayr;2017-10-11 08:15:00.000;2017-10-11 16:30:00.000;work;60;11.10.2017 08:24;11.10.2017 16:14
  1204;Karl;Jechsmayr;2017-10-12 12:30:00.000;2017-10-12 16:45:00.000;work;0;12.10.2017 12:39;12.10.2017 16:43
  1205;Brigitte;Jechsmayr;2017-10-13 08:10:00.000;2017-10-13 12:25:00.000;work;0;13.10.2017 08:13;16.10.2017 07:41
  1207;Lisa;Jechsmayr;2017-10-16 07:30:00.000;2017-10-16 17:05:00.000;work;30;16.10.2017 07:41;16.10.2017 17:05
  </code></pre>
  
  <p>I'm trying to split the file (>750.000 rows) by the <strong>UserId</strong>-Column (1400 distinct userids).
  All Datasets by one UserId should be moved/coppied to a seperate csv-File named like
  <strong>UserId_LastName-FirstName.csv</strong></p>
  
  <p>I don't have any Idea how to do that. I work on a Windows 10 PC.
  I tried various scripts found on stackoverflow/google already. Seems not to work:
  export generates a ".csv" without a name and 0KB size (empty)
  Or it does nothing.</p>
  
  <p>I tried:</p>
  
  <pre><code>Import-Csv file.csv | Group-Object -Property "UserId" | 
      Foreach-Object {$path=$_.name+".csv" ; $_.group | 
      Export-Csv -Path $path -NoTypeInformation}
  </code></pre>
  
  <p>Generates: file with the same content like the Origin but with " at the front and end of each line and filename <strong>.csv</strong> (just extention, no name)</p>
  
  <pre><code>awk -F',' 'UserId==NR{a[$1]++;next} a[$1]==1'  file.csv file.csv
  </code></pre>
  
  <p>Output: nothing - no file no error </p>
  
  <p>And some other- I cannot find anymore - sorry.</p>
  
  <p>Thanks for help.</p>