Bird
0
0

What does the -not operator do in PowerShell?

easy📝 Conceptual Q2 of 15
PowerShell - Operators
What does the -not operator do in PowerShell?
AReturns true if both conditions are true
BReturns true if at least one condition is true
CNegates the condition it is applied to
DChecks if exactly one condition is true
Step-by-Step Solution
Solution:
  1. Step 1: Identify the function of -not operator

    The -not operator reverses the truth value of the condition it is applied to.
  2. Step 2: Differentiate from other operators

    Unlike -and or -or, -not only negates a single condition.
  3. Final Answer:

    Negates the condition it is applied to -> Option C
  4. Quick Check:

    Logical NOT = -not [OK]
Quick Trick: Use -not to reverse a condition's truth value [OK]
Common Mistakes:
  • Thinking -not combines two conditions
  • Confusing -not with -or
  • Using -not without a condition

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes