Summary
In this chapter explored creation and interaction with variables in PowerShell, a fundamental part of any scripting language.Variables can be used in strings to create dynamic content in code. The use of provider specific variables in strings was explored.Variable commands are available to interact with variables beyond changing the value, such as setting a description, making a variable in a specific scope, or exploring facets of a variable.Variable scope was explored, and scope modifiers were introduced which can affect the scope in which a variable is set.Arrays and more advanced collections were introduced as a means of storing larger sets of data. The idea of assigning statements instead of explicitly building arrays was introduced as the simplest and most performance friendly approach.Finally, hashtables and ordered dictionaries were explored. Hashtables are very widely used in PowerShell for multiple purposes and can be used as indexed lookups to build fast comparisons...