Summary

This chapter explored the many methods with which you can use PowerShell operators. You started by learning the comparison operator basics. You then learned about the equal and not equal and greater than and less than comparison operators. You learned that you can use these operators to compare numbers, strings, dates, and times. You then proceeded to explore the -contains, -like, and -match operators. You learned that you can add not to these operators to create the inverse of the operator. You also understood that you can add c for case sensitivity and i for case insensitivity to the comparison operators. You also saw how to join multiple operators using the -and / -or operators.

The chapter ends by providing the best practices for the ...

Get Mastering Windows PowerShell Scripting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.