Question
1) Write a PowerShell script that takes any command as a parameter and displays help on that command (e.g. the result of execution of get-help
1) Write a PowerShell script that takes any command as a parameter and displays help on that command (e.g. the result of execution of get-help
2) Write a PowerShell script that takes three parameters. If number of parameters passed to the script is not equal to 3, it prints a warning message and displays a proper usage hint: "Usage: foo.sh param1 param2 param3". If 3 parameters are passed, the script should print some positive message.
3) Write a PowerShell script that takes names of two files as parameters and copies content of one file into another without asking any questions. The copy should contain a note that it is a copy, name of the original file, current date and time after the content.
4) Write a PowerShell script that takes a file name as a parameter and ask if a user wants to delete that file. If the answer is Y and the file exists, it is deleted. If the file does not exist, an error message is displayed.
5) Write a PowerShell script that asks user to enter a positive integer number, prints that number and prints whether that number is odd or even.
6) Write a PowerShell script that takes a file name that does not currently exist, as a parameter and ask if a user wants to create that file. If the answer is Y and the file does not exists, it is created. If the file does exist, an error message is displayed.
7) Write a PowerShell script that asks user's year of birth and prints "Minor" if the user is younger than 21, "Senior" if the user is older than 65, "Workforce" otherwise.
8) Write a PowerShell script that plays guess-a-number game, shrinks the range with each guess, and counts attempts. Your program should correctly process a case when a user enters a number smaller than current min or greater than current max. In such cases an attempt counter should change, but the range must stay the same.
9) Write a PowerShell script that takes directory name and a file extension as parameters, creates a directory with the specified name and moves all files with the specified extension from the current directory to the new one.
10) Write a PowerShell script that takes a number and a character ('C' or 'F') as parameters and converts that number from Celsius to Fahrenheit (if 'C' is passed) or vice versa (if 'F' is passed). If the number of parameters passed is not equal to 2, your script displays a usage note: "temp.sh
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started