Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Background Jobs Using PowerShell ISE or VSCode, create a new script called ~DesktopITS3410wherefrom.ps1 Enter $cityName = read-host Type the name of the city you reside
Background Jobs
- Using PowerShell ISE or VSCode, create a new script called ~\Desktop\ITS3410\wherefrom.ps1
- Enter $cityName = read-host Type the name of the city you reside in
- Enter write-host You are from $cityname`? I have been there many times!
- Save the script
- Run the script and enter the city you live in
Paste a screenshot of the results here
- Execute the script as a job type: start-job -filepath ~\Desktop\ITS3410\wherefrom.ps1
- If it successfully executes, look at the table for the Job ID
- To see what the job is doing in the background, type: receive-job n # Where n is the job number
- Type the name of the city you live in
- To get the results of the command type: receive-job n # Where n is the job number
Paste a screenshot of the results here
Programming Project Part 1
Using PowerShell ISE or VSCode, create a PowerShell script that will do the following:
- Get the Windows Event Log for System
- Capture all the warnings between the dates of January 1 and July 1 of the current year
- Send the output to a file called {your name}_system.log
- Capture all the errors for August of the current year
- Append the output to the same log file
Upload the script. Upload the log file.
Programming Project Part 2
Using PowerShell ISE or VSCode, create a PowerShell script that will do the following:
- Ask for the users name
- Ask the user for a 2-digit number
- Validate this number is two numeric digits
- Take into account leading zeroes
- If the number is invalid, have the user try again
- Ask the user for a 3-digit number
- Validate this number is three numeric digits
- Take into account leading zeroes
- If the number is invalid, have the user try again
- Perform the following mathematical calculations on the numbers
- Multiply the two numbers
- Add the two numbers
- Subtract the two numbers (negative results are acceptable)
- Divide the two numbers
- Check for divide by zero
- Let the user know if this wont work
- Output the following information to the screen
- Name: users name
- First number: first number
- Second number: second number
- First number x second number: result
- First number + second number: result
- First number - second number: result
- First number / second number: result or error message if it cannot be done
Upload the script. Paste screenshot of the results here
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