Learning PowerShell – Homework Nine

Share:
PowerShell

PowerShell Homework Nine

By: Steven Aiello

Answer the questions as best as possible in your own words. By answering the question in your own words you will learn more than simply repeating what you’ve heard. You are encouraged to visit the source links in the lessons to do more research on the subject.

Remember the point of the homework is not simply to finish, but to learn!

1. From your own thoughts and reasoning why is it good only to accept known good input from users and disregard all other input?

2. What is the command that PowerShell uses to solicit user input?

3. Describe the difference in what is displayed if you use the above command from the PowerShell ISE or from the PowerShell command prompt.

4. In your own words why would you choose to use a switch statement over elseif statements.

5. Write a PowerShell script that creates a menu of your choice, accepts the user input, and tells them what they selected. All other options entered in should produce an error.

Share:

Leave a reply

fourteen + = fifteen

This site uses Akismet to reduce spam. Learn how your comment data is processed.