In PowerShell the if, else if, and else statement is almost the same as in other programming languages. This line will print the text in the first code block as the x value is greater than 4 but smaller than 6.
> $x = 5 > if ($x -gt 4) { "Hello" } elseif ($x -gt 6) {"hi"} else {"hey"} Hello >
Remember to hit enter after you have typed the $x=5 line into the PowerShell command prompt.