PowerShell - OperatorsWhat does the -not operator do in PowerShell?AReturns true if both conditions are trueBReturns true if at least one condition is trueCNegates the condition it is applied toDChecks if exactly one condition is trueCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify the function of -not operatorThe -not operator reverses the truth value of the condition it is applied to.Step 2: Differentiate from other operatorsUnlike -and or -or, -not only negates a single condition.Final Answer:Negates the condition it is applied to -> Option CQuick Check:Logical NOT = -not [OK]Quick Trick: Use -not to reverse a condition's truth value [OK]Common Mistakes:Thinking -not combines two conditionsConfusing -not with -orUsing -not without a condition
Master "Operators" in PowerShell9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More PowerShell Quizzes Cmdlets and Pipeline - Pipeline concept (|) - Quiz 12easy Control Flow - Why control flow directs execution - Quiz 6medium Control Flow - If-elseif-else statements - Quiz 10hard Operators - Comparison operators (-eq, -ne, -gt, -lt) - Quiz 5medium Operators - Arithmetic operators - Quiz 12easy Variables and Data Types - Hash tables (dictionaries) - Quiz 14medium Variables and Data Types - String type and interpolation - Quiz 10hard Variables and Data Types - Variable creation with $ - Quiz 1easy Variables and Data Types - Why variables store data - Quiz 11easy Variables and Data Types - Arrays - Quiz 12easy