From the course: PowerShell: Automating IT Administration
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Using conditional statements and comparisons - PowerShell Tutorial
From the course: PowerShell: Automating IT Administration
Using conditional statements and comparisons
- [Instructor] So, here we are on a Windows 11 machine. And first off, there's a couple of things that have been installed. If I click into the PowerShell here, as it's Windows 11, we have the Windows terminal installed. And so I've installed PowerShell 7. If I'd use the drop down, you can see I have Windows PowerShell, and I also have PowerShell. That means I've installed Windows 7 PowerShell. Secondly, I've also installed Visual Studio Code purely based on the fact that I have some files I wish to utilize. And so it's easier as an editor to be able to go through and see them. So now that we've got that, let's focus on understanding conditional statements and comparison. Now, PowerShell provides a platform for us to be able to do some kind of logic that will say, "Hey, if this is this, do that." And to make it more complicated too. So as a simple example here, in our first one, we've defined a variable. The…
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
-
-
-
-