Learning PowerShell – Lesson Two Answers

Share:
PowerShell

PowerShell Homework Two

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. What is a computer script and what does a computer script interact with?

A computer script is an automated way to interact with the computer shell, and a shell is the interface that generally interacts with the system kernel.

2. In what ways is a computer script different than a computer application?

In general a script can be something that “usually” not always processes something internal to the operating system, or systems that operating system touches. Applications have a tendency to be focused on processing user data.

3. What is Pseudo-Code?

Pseudo-Code is the process of logically laying out what you want your script or program to do in human language before you start writing any actual script or code.

4. Write some Pseudo-Code for tying your shoe.

(I will keep this short and start with the premise I’m sitting on a chair)

Bend over

Pick up shoe

Put shoe on foot

Grab laces

Tie laces in a not

Etc, as you can see even simple things can be broken down into quite a bit of pseudo-code

5. Explain in your own words how comparison operators are different than logical operators.

In generally comparison operators have a tendency to do with math; logical operators have a tendency to deal with if/then, or and/or statements.

6. Do a Google search for “PowerShell comparison operators” and list what the operators are for:

Equal to (hint –eq)

Less than = -lt

Greater than = -gt

Greater than or equal to = -ge

Less than or equal to = -le

Not equal to -ne

7. What are the PowerShell logical operators for:

Not (first option) = -not

Not (second option) = !

And = -and

Or = -or

Share:

Leave a reply

five + one =

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