PowerShell If statement - controlling the flow of your code

In this video we are exploring how to use If statement in various scenarios. If statement allows you to take tide control over the execution of your code, by dictating your script what to do in a given situation. # Link to the video: https://youtu.be/j8Ubwv8ApdU # Documentation: # Operators: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_operators?view=powershell-7.1 # About If: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_if?view=powershell-7.1 # Basic version # if something is true then do this if ($true) { "This is true" } if ($false) { "This is false" } # if something is true then do this, otherwise do that if ($true) { "This is true" } else { "This is false" } if ($false) { "This is true" } else { "This is false" } # let's do some actual example if ( 5 -gt 3 ) { "This is more!...

3 July 2021 · 3 min · 608 words · Kamil