Assignment task’s: BASIC:
Use Get-Help to investigate the *-Variable Cmdlet functionality and syntax. Use the
discovered Cmdlets to complete the tasks below.
Create a new variable named “myName” with the Description “This is my name” and the
value of <your name>.
Modify the variable’s value to contain the string “Windows Azure”
Remove the variable created in step 5a. How can you ensure it was deleted?
Create a new variable, with the option “ReadOnly”, named “myReadonly” with the value
“I’m read only!”
Try to reassign the $myReadOnly variable another value. Did it work?
Use the Remove-Variable’s –Force switch parameter to delete the variable.
Create a new variable, with the option “Constant”, called “myConstant” with the value
42.
Assign the $myConstant variable a different value using either the assignment operator
or one of the *-Variable Cmdlets. What happens?
Remove the $myConstant variable using the –Force parameter. Was this successful. How
can you delete a constant variable?
What is the difference between Single quotes & Double Quotes??
How could you retrieve a list of all of the currently defined variables? Write the possible
commands below. ?
NOTE: Variable names are not case-sensitive. Variable names can include spaces and special
characters, but these are difficult to use and should be avoided.