From the course: PowerShell 7 Essential Training

Unlock the full course today

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

Work with JSON objects

Work with JSON objects - PowerShell Tutorial

From the course: PowerShell 7 Essential Training

Start my 1-month free trial

Work with JSON objects

- [Instructor] So now that we've looked at utilizing CSV files, XML files, et cetera, and more common format to use is actually JSON. So that's the JavaScript Notation type stuff. If I paste this in here, I'm just going to generate a JSON file. So what this will do, is I'm going to use system info, which will be details of the current machine that I'm on. And I'm then going to say, convert that from the CSV format, and choose convert to JSON and I put the file. That's just a precursor. So this is going to retrieve all of the process information about my machine, and drop it into a file. So we should see this computer info option. I'm going to say open with notepad, and you'll see that we get kind of squarely brackets, and then some information, and then a squarely bracket. Which is the JSON notation type structure. So the idea being behind JSON, is that it's fairly lightweight, it's easy to traverse up and down. Whereas…

Contents