Powershell: Learn How To Use The If/Then/Else Powershell Construct
Get more screencasts — powershellbeginner.com
Keep up to date on Powershell — adamtheautomator.com
The screencast we’ll be going over on conditional logic is the classic if/then/else construct. This construct has been a staple of programming languages for decades and it’s obviously part of Powershell as well. This construct as well as the slightly more complex if/then/elseif/else construct is in nearly every script I write and will most likely show up in a lot of your scripts as well.
This is a simple but very powerful method of designing your scripts in Powershell. It is important that you understand the if/the/else construct and how to use it. Fortunately, by using plain English terminology, Powershell makes learning this concept a lot easier so let’s see what we can do with it.
If you’re interested in learning more about Powershell, visit powershellbeginner.com which includes 4+ hours of content with step-by-step screencasts for all topics on Powershell to get a beginner started!