How can I import users from a CSV file using PowerShell?

January 22, 2026 2 answers
Asked by CuriousCoder82
I'm working on a script to import users from a CSV file that contains columns like Firstname, Lastname, Group, and OU, separated by semicolons. However, I'm having trouble getting it to work. Can anyone provide a complete, working script or guidance on how to properly import users from this type of CSV file?

Answers

TechWhiz09
To import your CSV data, you can use the `Import-Csv` cmdlet in PowerShell. Since your file is delimited by semicolons, you'll need to specify that in your command. Hereโ€™s an example of how you might write it: ```powershell Import-Csv -Path pathtoMyData.csv -Delimiter ";" ``` Make sure to replace `pathtoMyData.csv` with the actual path to your file. This should help you correctly read the data in your file!
Reply to this answer
HelpfulSam99
Could you share what youโ€™ve tried already? Itโ€™s hard to help without knowing where the script is failing. If you just want someone to write the complete script for you, it might be a good idea to consider what services you're willing to offer in return!

CuriousCoder82: I can't post my actual script here, but I'm open to sharing specifics if that helps!

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions