Changes

Jump to: navigation, search
Using if ... elseif .. Statements
</pre>
This approach works well for a moderate number of comparisons, but can become cumbersome for a larger volume of expression evaluations. For such situations, the Windows PowerShell ''switch'' statement provides a more flexible and efficient solution. For more details on using the ''switch'' statement read the chapter entitled [[The Windows PowerShell 1.0 switch Statement]].
== Summary ==
In this chapter we looked at the use of Windows PowerShell ''if'' statements including if, if ... else and if ... elseif ... constructs. In the next chapter of this book we will look at looping in Windows PowerShell using ''for'' and ''foreach''

Navigation menu