From the course: PowerShell: Functions for Advanced Automation

Unlock the full course today

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

Create and manipulate XML data

Create and manipulate XML data

From the course: PowerShell: Functions for Advanced Automation

Start my 1-month free trial

Create and manipulate XML data

- [Instructor] In this segment, we're going to continue working with XML files. This time, we're going to be writing to them. We previously looked at an employee roster, that had job titles, hire dates, and performance evaluation data. We're going to load this back in again, using the same two cmdlets as last time. In fact, let me go ahead and start out by doing that right now, and then, to make sure the information is what we expect, let's go ahead and display it, running it through the format table filter. There's the information, this is an important step, don't assume that just because a cmdlet seems straightforward, or because the file was right yesterday, that it will always run the way you expect it, check it out, test it, so, here we are with our list of employees, and let's say while reviewing this, we discover some missing or outdated information. Let's take a look at the steps to write to this XML file. We're going to look at three different types of edits, the first is…

Contents