Looking for powershell Answers? Try Ask4KnowledgeBase
Looking for powershell Keywords? Try Ask4Keywords

PowerShellConditional logic


Syntax

  • if(expression){}
  • if(expression){}else{}
  • if(expression){}elseif(expression){}
  • if(expression){}elseif(expression){}else{}

Remarks

See also Comparison Operators, which can be used in conditional expressions.