Book Image

Mastering Windows PowerShell Scripting

By : Brenton J.W. Blawat
Book Image

Mastering Windows PowerShell Scripting

By: Brenton J.W. Blawat

Overview of this book

Table of Contents (22 chapters)
Mastering Windows PowerShell Scripting
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 implementation of comparison operators. By the end of this chapter, you should be proficient in using comparison operators, know what to avoid, and be well on your way to evaluating variables and arrays. In the next chapter, you will explore how you...