Introduction

Completed

When you create a script, reusing data from other sources is useful. Most applications can export the data you want in various formats such as a CSV file or an XML file. You can use Windows PowerShell cmdlets to import data in different formats for use in your scripts. In this module, you'll learn how to import data from a text file, CSV file, XML file, and JavaScript Object Notation (JSON) file.

Learning objectives

After completing this module, you'll be able to:

  • Describe how to use Get-Content to review file data.
  • Describe how to use Import-Csv to retrieve data.
  • Describe how to use Import-Clixml to import XML data.
  • Describe how to use ConvertFrom-Json to work with JSON data.

Prerequisites

Familiarity with:

  • Windows networking technologies and implementation
  • Windows Server administration, maintenance, and troubleshooting
  • Windows PowerShell and its commands to perform specific tasks
  • PowerShell cmdlets used for system administration tasks related to Active Directory, network configuration, server administration, and Windows 10 device administration
  • Windows PowerShell pipeline, PowerShell providers, and PowerShell drives
  • CIM and WMI technologies
  • The use of variables, arrays, and hash tables in Windows PowerShell