0% found this document useful (0 votes)
28 views1 page

PowerShell Variable Case Sensitivity Basics

The document provides instructions for completing basic tasks using variables and variable cmdlets in PowerShell. It includes steps to: create, modify, and remove variable values; create read-only and constant variables; and investigate the differences between single and double quotes when defining variables. It asks how to retrieve a list of currently defined variables and notes that variable names are not case sensitive but spaces and special characters should be avoided.

Uploaded by

ChaviCharu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views1 page

PowerShell Variable Case Sensitivity Basics

The document provides instructions for completing basic tasks using variables and variable cmdlets in PowerShell. It includes steps to: create, modify, and remove variable values; create read-only and constant variables; and investigate the differences between single and double quotes when defining variables. It asks how to retrieve a list of currently defined variables and notes that variable names are not case sensitive but spaces and special characters should be avoided.

Uploaded by

ChaviCharu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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.

You might also like