-
Book Overview & Buying
-
Table Of Contents
Mastering Windows PowerShell Scripting
By :
PowerShell provides a variety of mechanisms to store, retrieve, and manipulate data used in your scripts. These storage "containers" are referred to as variables, arrays, and hashes. They can be used as containers to store strings, integers, or objects. These containers are dynamic as they automatically detect what type of data is being placed within them. Unlike other object-oriented languages, there is no need to declare the container prior to use. To declare one of these containers, you use the dollar sign ($) and the container name.
An example of a container would look like this:
$myVariable
During this chapter, you will learn the following concepts:
When you are creating names for containers, it is industry best practice to use names that are representative of the data they are storing. While containers are not case sensitive in PowerShell, it is a common practice to use camelCase when writing container names. camelCase is achieved by keeping the first letter of the container lowercase and the subsequent first letters of each word capitalized. Some variations of camelCase permit the first letter to be capitalized. This formatting aids in easy reading of the containers.
An example of a container using camelCase would look like this:
$webServerIPAddress
Change the font size
Change margin width
Change background colour