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 - PowerShell Tutorial
From the course: PowerShell for SQL Server Administration
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Loops in PowerShell6m 21s
-
Storing servers for PowerShell3m 53s
-
Concepts of threading6m 10s
-
PowerShell threading commandlets2m 37s
-
Authentication and threading3m 24s
-
Piping between objects3m 17s
-
Exporting CSV files2m 56s
-
Importing CSV files2m 27s
-
Exporting XML data2m 50s
-
Importing XML data2m 26s
-
-
-