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.

Retrieve data

Retrieve data - PowerShell Tutorial

From the course: PowerShell 7 Essential Training

Start my 1-month free trial

Retrieve data

- [Instructor] Now that we've looked at using files and folders, one of the things that's really critical in PowerShell is accessing of data, whether that's from a text file, whether it's from a Json file or a database or something else. So firstly, I'm going to set my location variable back to a new folder because if I go into my folder structure here, go into my data, I have some objects that I wish to utilize. So the first thing here is I want to be able to create some kind of content and also edit content. So a simple example of this is to do something like this, which will say count from one to a hundred is kind of my range. And then what I want to do is do a for each object command, which is going to loop through those numbers, starting at one all the way to a hundred. Now, what I can do here is say add content, path. Remember, the path that we're going to use. So I'm going to do my dollar location again. And then…

Contents