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

Chapter 3. Comparison Operators

PowerShell comparison operators are used to validate data present within your scripts. These operators enable you to compare data and execute code based on the data. This makes PowerShell an extremely effective tool to use for processing complicated data with the available comparison operators.

In this chapter, you will learn the following concepts:

  • Comparison operator basics

  • Equal and not equal comparison operators

  • Greater than and less than comparison operators

  • Contains, like, and match comparison operators

  • -AND / -OR comparison operators

  • Best practices for comparison operators