From the course: PowerShell: Automating IT Administration
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Working with arrays and hash tables - PowerShell Tutorial
From the course: PowerShell: Automating IT Administration
Working with arrays and hash tables
- [Instructor] In the past few examples, we've imported data, we've created variables and populated them with numbers as well as text values. So I wanted to work through understanding arrays and hash tables, which are used for population of data. It can be small amounts or large, it really makes no difference. In a simple example here, we're creating a variable called numbers. I'm going to click run selection. And when I actually say numbers, it renders those numbers out. So a standard variable or array variable is going to return sets of information really based on what we put in there, and it'll comma separated. Now, what about if we wanted to select a specific value from that array? Now, in this example here, where we're using the numbers 1, 2, 3, 4, 5, you would potentially have to go through a for each statement to be able to pull out the one that you wanted to and say, "If this was equal to that, then do this."…
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
-
-
-
Why automate IT administration tasks?3m 3s
-
(Locked)
What are PowerShell modules, and why are they useful?4m 2s
-
(Locked)
Using conditional statements and comparisons12m 49s
-
(Locked)
Looping constructs for data manipulation13m 40s
-
(Locked)
Manipulating data with logic tests and loops7m 58s
-
(Locked)
Working with arrays and hash tables11m 13s
-
(Locked)
Understanding PowerShell error handling22m 40s
-
-
-
-