Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Function 1 3.1. Create a function Named Get-MACVendor that returns the Vendors Full Name. 3.2. The script takes one optional argument $MACAddress and one Mandatory

Function 1

3.1. Create a function Named Get-MACVendor that returns the Vendors Full Name.

3.2. The script takes one optional argument $MACAddress and one Mandatory argument $DatabasePath

3.2.1.The DatabasePath accepts filename of the database to use. Dont assume a directory location.

3.2.2.Throw and error if the database file cant be found use or duplication without permission is prohibited.

3.3. If a MAC address is specified return the Vendor of that MAC address

3.4. If the MAC address is not supplied discover the MAC addresses of the network adapters on the computer and look up the Vendor of each address. Return Each Vendor Name. 3.4.1.You can get the MAC address on windows With Get-NetAdapter. On Linux you might use the ifconfig command look for the ether section.

3.5. The script must work on Windows and Linux or OSX

3.6. The MAC address database is in the psfiles/data/MACDatabase.txt 4.

Function 2

4.1. Create A function named Format-Songs that retrieves and formats the song data from psfiles/data/RushSongs.txt as follows

4.2. The script takes one mandatory and one optional arguments

4.2.1. $DatabasePath (madatory) is the file that contains the song information

4.2.2. $Path is the file to save the output to, if missing just return report to output stream.

4.2.3.Throw an error if the database cant be found or the file cant be saved.

4.3. Group songs by album then sort alphabetically by title. List albums by year newest to oldest in the report.

4.4. Example Output Hints Use PowerShell interactively to learn how to manipulate the data before writing the script. Youre not coding in Java or C use the strengths of PowerShell. If your code looks like you would do it in Java or C you are doing it wrong. Get-MACVendor Import-csv may not be the easiest way to work with the MAC database R40

param( $filename='MACDatabase.txt' ) Invoke-WebRequest -Uri https://gitlab.com/wireshark/wireshark/-/raw/master/manuf -OutFile $filename

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_2

Step: 3

blur-text-image_3

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

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

Demonstrate through language that you are grateful to be informed.

Answered: 1 week ago

Question

LO6 Describe how individual pay rates are set.

Answered: 1 week ago