Unit 2 Assignment 1: Reading Questions
Directions: After you've completed the reading assignment, respond to the items below using complete sentences. Remember to provide proper APA citation for any resources you use.
- How do you execute a PowerShell script that is in the current directory?
- What commands are used to view and set the execution policy?
- What are the different execution policies?
- How do you convert a plain text password to a securestring?
- What is the proper file extension for a PowerShell script?
- You would like to run a script to change the working directory and create some aliases before PowerShell is started. What is the path and name of the profile script that you would create?
Variables, Arrays, and Escape Characters
- What is a variable?
- What is an array?
- How are names for variables and arrays constructed?
- What is the function/description of the $_ automatic variable?
- What is the function/description of the $Args automatic variable?
- How do you display the contents of a variable in the PowerShell console?
- How can you determine a variables type?
- What character is used to indicate an escape character?
- What are escape characters used for?
- What is an environmental variable?
- How do you access an environmental variable?
- What character is used to assign values to variables?
- List the arithmetic operators.
- What are the purposes of the -split and -join string operators?
- List the comparison operators.
- How can the range operator be used to generate the numbers between 1 and 10?
Loops and Decision Making Constructs
- When would you use an If statement with an ElseIf and Else script blocks?
- When would you use a Switch statement?
- When would you use a For loop?
- When would you use a ForEach loop?
- When would you use a Do While loop?