Bird
0
0

In PowerShell, which operator ensures that the entire condition is true only when both sub-conditions are true?

easy📝 Conceptual Q1 of 15
PowerShell - Operators
In PowerShell, which operator ensures that the entire condition is true only when both sub-conditions are true?
A-not
B-or
C-and
D-xor
Step-by-Step Solution
Solution:
  1. Step 1: Understand the operators

    -and requires both conditions to be true; -or requires at least one; -not negates; -xor is exclusive or.
  2. Step 2: Identify the operator for both true

    -and returns true only if both operands are true.
  3. Final Answer:

    -and -> Option C
  4. Quick Check:

    Check if both true returns true with -and [OK]
Quick Trick: Both true means use -and operator [OK]
Common Mistakes:
  • Confusing -and with -or
  • Using -not instead of -and
  • Thinking -xor means both true

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes