Challenge
Code challenges throughout these modules reinforce your learning, and help you gain confidence before you move on to the next lesson.
Note
This exercise is optional. If you want to complete this exercise, you'll need to create an Azure subscription before you begin. If you don't have an Azure account or you don't want to create one at this time, you can read through the instructions so you understand the information that's being presented.
Step 1: Close any open files in the Cloud Shell code editor
To close any open files in the Azure Cloud Shell code editor, use the keyboard shortcut Ctrl+Q in Windows (or ⌘+Q on macOS).
Step 2: Create a new file and write your code
Create a new file named GettingStarted.ps1, and use the Cloud Shell code editor to open it.
Step 3: Write code in the Cloud Shell code editor that displays two messages
Use the techniques that you learned in the last exercise, to print one message and then collect user input for reuse in a second message. Earlier, you displayed a message in just one line of code. You then requested input from a user and then reused that value to print a custom message. Use both techniques for this challenge.
No matter how you do it, your code should produce something like the following output. In this example, replace the placeholder text <current date> and <your name> with values that you choose.
Today's date is <current date>.
Today is the day <your name> began a PowerShell programming journey.
Step 4: Run the code
Close the code editor, and then run the script in the Cloud Shell terminal.
Whether you get stuck and need to peek at the solution or you finish successfully, continue to view a solution to this challenge.