Answered step by step
Verified Expert Solution
Link Copied!

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

  1. Using PowerShell ISE or VSCode, create a new script called ~\Desktop\ITS3410\wherefrom.ps1
  2. Enter $cityName = read-host Type the name of the city you reside in
  3. Enter write-host You are from $cityname`? I have been there many times!
  4. Save the script
  5. Run the script and enter the city you live in

Paste a screenshot of the results here

  1. Execute the script as a job type: start-job -filepath ~\Desktop\ITS3410\wherefrom.ps1
  2. If it successfully executes, look at the table for the Job ID
  3. To see what the job is doing in the background, type: receive-job n # Where n is the job number
  4. Type the name of the city you live in
  5. 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:

  1. Get the Windows Event Log for System
  2. Capture all the warnings between the dates of January 1 and July 1 of the current year
  3. Send the output to a file called {your name}_system.log
  4. Capture all the errors for August of the current year
  5. 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:

  1. Ask for the users name
  2. Ask the user for a 2-digit number
    1. Validate this number is two numeric digits
    2. Take into account leading zeroes
    3. If the number is invalid, have the user try again
  3. Ask the user for a 3-digit number
    1. Validate this number is three numeric digits
    2. Take into account leading zeroes
    3. If the number is invalid, have the user try again
  4. Perform the following mathematical calculations on the numbers
    1. Multiply the two numbers
    2. Add the two numbers
    3. Subtract the two numbers (negative results are acceptable)
    4. Divide the two numbers
      1. Check for divide by zero
      2. Let the user know if this wont work
    5. Output the following information to the screen
      1. Name: users name
      2. First number: first number
      3. Second number: second number
      4. First number x second number: result
      5. First number + second number: result
      6. First number - second number: result
      7. 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

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

Explain methods of metal extraction with examples.

Answered: 1 week ago