Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Powershell You will be tasked with creating 5 custom functions and be graded on their naming, functionality and comments Function Description Name Function Create

Using Powershell

You will be tasked with creating 5 custom functions and be graded on their naming, functionality and comments

Function

Description

Name Function Create function that prompts the user for their name, then outputs it in capital letters and in red text. No parameters or arguments are required for this function
Time Function

Write function that will write the date in the following fashion:

"Hello, today is DATEand the time is 10 hours and 42 minutes"

The bold and underscored texts are what you will need to ensure are correct. Hint: Use the properties of a specific cmdlet to get the date, hours and minutes.

Text Color Function

Write function that will accept 2 parameters, one for text, and one for color.

For this function, we will limit the "colors" parameter to "red, white, blue"

The function will accept user text, then, depending on the color parameter, output the text in a specific color.

The function will look like this:

my-funct -text "hello world" -color "blue"

OUTPUT: hello world

-----

my-funct -text "hello world" -color "red"

OUTPUT: hello world

Calculator Function

Write function that will accept three parameters, a "num1, num2, mathoperator"

the "mathoperator" parameter will potentially have a few values "plus, minus, multiply"

The function usage will look like this

my-funct -num1 5 -num2 3 -mathoperator "multiply"

OUTPUT: 15

------

my-funct -num1 1 -num2 2 -mathoperator "add"

OUTPUT: 3

Bonus Function

Create brand new function that will accept parameters and provide an input. Anything goes here. Please ensure you follow best practices and that the function isn't anything we've used in our lectures or anything above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Restaurant From Concept To Operation

Authors: John R Walker

5th Edition

0471740578, 9780471740575

More Books

Students also viewed these General Management questions

Question

Food supply

Answered: 1 week ago

Question

Mortality rate

Answered: 1 week ago