CSV and Powershell Script

About: https://courses.serveracademy.com/courses/take/module-2/lessons/5851159-creating-user-accounts-from-a-csv-comma-separated-value-file

When I use the default newusers.csv what is with the course and at the part that you want to see the first name, that is all working find.

Now, I got my own server to play around with. So, I needed to edit the Organizational Unit so will be placed in the right OU.
If I open the file then it is not in columns but as a long line.

One problem I do know is that the separate " sign" in the English and Dutch is different, English us the " ," and we use the “;” to separate. That is because we use the “,” also for the Decimal Sysmbol. ( 120,50 is in English (or US) 120.50)


Now I did changed it in the regional setting (not in this screenshot), but that is not giving me a solution .

If I change it in Excel under the menu Data and then text to Columns, and follow the steps (maybe something goes there wrong) and I save the file. Powershell is not able to read out the data (for this then the column " First Name" . newuser1.csv is default, newuser3.csv is the edit version, as you can see that newuser3.csv does give no result.

So, how to get around this.
Can try to make a new one… then need to get all the date over.

Nothing important but would like to know how to get a fix for this… What I said, I thought it was i the Region Settings, but seems not.
Powershell cannot read the date if I change it to columns

1 Like

Ah - interesting. In excel, when you import the CSV you should be able to specify the delimiter:

Also try the following for PowerShell:

Import-Csv -Delimiter ‘,’

ha thx… I will look at that tomorrow.

Now I need to type something bogus, because I need 50 characters for a short reply… :smiley:

1 Like