From the course: PowerShell for SQL Server Administration

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Importing CSV files

Importing CSV files - PowerShell Tutorial

From the course: PowerShell for SQL Server Administration

Start my 1-month free trial

Importing CSV files

- [Instructor] So let's talk about importing CSV files. So there's a lot of times where you're going to need to get a CSV file from a third party, from another application, and import that into your PowerShell script, so you can do something with it. We can import those CSV files fairly easily into PowerShell by using a basic import CSV command let. So again, these files are going to be from a third party. They're going to be from, typically, a vendor. They're going to hand you off a CSV file, which you then need to import into your app and do something with. So we can use that import CSV command let to import that CSV file into a variable, and once we have that data in our PowerShell script, we can do whatever we want with it at that point. So let's go ahead and look at a quick example, and we can see what this actually looks like. So, here we have our import CSV command let. We specify a path, in this case we're just going to import the process, that CSV file, we exported a second…

Contents