Chapter 4. Operators and expressions

4.1 Arithmetic operators
4.2 The assignment operators
4.3 Comparison operators
4.4 Pattern matching and text manipulation
4.5 Logical and bitwise operators
4.6 Summary

Operators, Mr. Rico! Millions of them!

Robert A. Heinlein, Starship Troopers (paraphrased)

So far, we’ve covered the basics, and we’ve covered the type system in considerable depth. Now let’s look at how you can combine all this stuff and get some real work done. As in any language, objects are combined with operators to produce expressions. When these expressions are evaluated, the operators perform their operations on objects, giving you (hopefully) useful results. This chapter covers the set of basic operators in PowerShell and how ...

Get Windows PowerShell in Action, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.