Multiple choice technology

Which operator is used to do a case sensitive text data comparison in PowerShell?

  1. -eq

  2. -neq

  3. -ceq

  4. -ieq

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

PowerShell provides case-sensitive comparison operators prefixed with 'c' and case-insensitive ones prefixed with 'i'. The -ceq operator performs a case-sensitive equality comparison, while -eq is case-insensitive by default and -ieq explicitly specifies case-insensitive comparison. There is no -neq operator in PowerShell.