Adjust Script Flow Using Conditional Statements
1. Problem
You want to control the conditions under which PowerShell executes commands or portions of your script.
2. Solution
Use PowerShell’s if, elseif, and else conditional statements to control the flow of execution in your script.
For example:
Code View: Scroll / Show All
       $temperature = 90
      Â
       if($temperature -le 0)
       {
         “Balmy Canadian Summer”
       }
       elseif($temperature -le [...]

