Learn PowerShell: Variables and Operators
Work with PowerShell variables and operators.
StartVariables and Operators
Lesson 1 of 1
- 1Welcome to the “Variables and Operators” lesson of your PowerShell journey. Regardless of our use case, one inevitable aspect of programming is storing and manipulating data to serve our needs. Dat…
- 3In this exercise, we will discuss how variable types are handled in PowerShell and a few advanced ways to interact with variables, including enforcing types, creating multiple variables, and a few …
- 4Environment Variables store information related to the current environment, like the Operating System and user sessions like our current terminal. They are global variables, meaning we can access…
- 5Operators are used to perform specific operations on data, often stored in a variable. PowerShell offers multiple types of operators to manipulate data, including: - Arithmetic Operators - Assign…
- 6In this exercise, we will discuss the assignment and unary operators. #### Assignment Operators We can use assignment operators to assign, change, or append values to variables. The general synta…
- 7Comparison operators are used to compare values, test conditions, or filter elements of a collection, such as an array. They return a Boolean value, True or False, as a result. #### Equality Opera…
- 8In this exercise, we will take a look at logical operators. Logical operators allow us to combine multiple True/False expressions and statements into complex conditionals. Using the operators -and…
- 9Just like in mathematics, the order in which operators are evaluated matters in programming. Operator precedence in PowerShell is as follows: - ( ) - ++ – - ! -not - * / % - + - - -is -isnot -as -…
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory