© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
I. WatersPowerShell for Beginnershttps://doi.org/10.1007/978-1-4842-7064-6_3

3. Variables

Ian Waters1  
(1)
Bexhill, UK
 

In this chapter, we are going to learn one of the most important parts of any script or program, variables! We are going to learn how they are used to store information and how they can be accessed and manipulated from different sections of your code. Variables come in many different types, and each type has specific ways to store and access the data.

I’ve bundled the code listed in this chapter into one file rather than having lots of small files to make it easy for you to try each of the examples by highlighting the code and choosing “Run ...

Get PowerShell for Beginners: Learn PowerShell 7 Through Hands-On Mini Games 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.