Top-Rated Free Essay
Preview

ops335 lab 2 firewall

Good Essays
695 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
ops335 lab 2 firewall
Introduction to Scripting and

Script 1 Specification:
You work for a medium size wholesale book publisher as the system administrator. This year management has decided, at the last minute, to sell books at its annual book conference. The company as a rule does not sell its books retail, consequently management does not want to purchase an off the shelve retail sales program. Rather, you have been assigned the task of writing a PowerShell text-based program called LearnName_SalesProgram.ps1 which will do the following.
Allow the sales clerk to the following at the console:
1. Enter the book title –data type string
a. If the user enters a null string, the program should beep and redisplay the needed value
2. Enter a one sentence description of the book -- data type string
3. Enter the book’s ID number. Code numbers are alpha-numeric (e.g. ROM482,SCI233,BUS400)
a. If the user enters a numeric value, the program should prompt for alphanumeric
4. Enter the list price of the book and include a dollar sign in the prompt. Make the list price a decimal data type or test to ensure that the user entered a numerical value.
5. Calculate the harmonized tax rate (HST) of 12% (list price X .12 = tax payable) – data type constant
6. Display the tax payable and total purchase price for the book to the customer.(tax + list price = purchase price)- data type decimal
7. Output the above information to a file called BookSalesConference2014.txt in the following
8. Optional: include a running total called “Total Book Sales:” which is saved to the file
9. The file format should look like the following:
______________________________________
Title of Book:
Description:
Code Number:
List Price:
Tax Payable:
Purchase Price:
_______________________________________
Total Book Sales: (optional)
Script 2 Specification:
It has been a couple of years since the wholesale book company inventoried its computer systems. You have been assigned to write a script which will run on the local system and capture the following information. Design your script so that it checks for a file called SystemInventory.log in the C:\backup\log directory. If the file does not exist, the program creates it, and if the file exits, the local information is appended to the file. In this way, the script can be run on each machine, and the log file summarizes the information for each system. Name your program LearnName_SysInventory.ps1
The output file should report the following information as below:
Today’s Date
Local Host Computer Name:
BIOS name and version number:
Size of Hard Drive in Gigabytes
Amount of Ram in Gigabytes
Operating System name and version number
Name of Installed software with Global Identifier
The date and ID of the last installed Hot Fix:
Name of Registered User who uses the system
Number of all users registered on the system (not Active Directory)
The information should be saved to the log file in the following format
Date:
======================================================================
Computer Name
================ ======================================================
BIOS Name:
BIOS Version:
HD Size:
RAM Size:
Operating System:
Operating System Version:
Installed Software Name:
Installed Software GUID:
Last Installed Hot Fix:
Name of Registered System User:
Names of All Registered System Users on the System:
========================================================================
========================================================================

To complete the inventory script you must use a combination of the Environment variables, WMIObjects, properties, and a DO Loop. If the user enters a null string, the program should prompt for the correct information. (Note: the goal is to create output that is easy to read. Use your discretion to improve the output)

Grading Criteria:
Your scripts will be graded out of 10 marks based on the following criteria:
Specification met 2 marks
Comments 2 marks
Neatness 2 marks
Originality 2 marks
Organization 2 marks Total 10 marks
Optional bonus 1 mark
Grading:
1. Save the PS1 files as text files and submit using the Safe Assign link on My Seneca in the Graded Work folder. Each file will be checked for source documents and plagiarism. Please Note, Plagiarized text will be handed over to the Academic Dishonesty Committee for Resolution.
2. Zip the following files together and submit using the link in the Graded Work\Assignments folder
LearnName_SalesProgram.ps1
BookSalesConference2014.txt
LearnName_SysInventory.ps1
SystemInventory.log
Student Declaration form (Standards Course Web Site)

You May Also Find These Documents Helpful