July 2017
Intermediate to advanced
648 pages
31h 9m
English
To create a variable, or an instance of an object, you prefix the variable name with the dollar sign ($). To the right of the variable name, use the equals (=) assignment operator, followed by the value or object that should be assigned to the variable. Keep in mind that the variables you create are only available during your current shell session and will be destroyed when you close the shell.
Let's look at another example. To create a string variable that contains an email address, use the following command:
$email = "testuser@contoso.com"
Read now
Unlock full access