PowerShell Script Programming Sample

Question

Create a script to produce a system information report. Each output section should have a title before it to clearly identify the section and separate it from the rest of the report. The report should be plain text. The report should be written for humans to read,and should use names for things like printer status,not numbers. Marks are given for each section that produces correct output only. A sample output report is available in the Assignments area on Blackboard. Correct output includes output formatting (e.g tables vs.list,names for presented data elements, etc.). Your output must include all of the data elements,formatted like the output in the sample output report on Blackboard,to receive full marks.

  1. Display the OS manufacturer,name, version,OS architecture,registered user, and serial number.
  2. Display information about the system including computer manufacturer,model,windows name,windows domain name,primary owner name, system type.
  3. Display the BIOS manufacturer,name,version,and serial number.
  4. Display the CPU manufacturer, model description,number of cores, maximum clock speed, and cache size(s).
  5. Display the RAM manufacturer, capacity,and speed.
  6. Display the ethernet interfaces(s) name,MAC address,and speed in Mbits/sec, assigned ip address and netmask,default gateway, dns domain, dns hostname,and dnssearchorder. Only includeipenabled interfaces.
  7. Display the mounted filesystems similar to the UNIX df command,showing the drive name,size of the filesystem in GB,free space in GB,free space percentage,and the share name if it is a network drive. Do not show drives that have no filesystem ,such as a CDROM device with no disk in it.
  8. Display a table of printers configured on the system showing the printer name, whether it is shared, whether it is the default printer, and the current status of the printer. Display the status,default, and shared information in English,not as codes.
  9. 9. Display a table of the installed software products showing the install date,vendor name,and software product name. Sort the producst by installation date,then by vendor,then by product name.

Solution:
Answer 1: - To get the manufacturer name : Get-WmiObject -Class Win32_ComputerSystem. To get the registered user, serialNumber and version use this command: Get-WmiObject -Class Win32_OperatingSystem -Namespace root/cimv2 -ComputerName. Name of the operating system: - (Get-WmiObject Win32_OperatingSystem).Name. Name of the OS

To Get Solution

Please put your valid email id

Plagiarism Checker

NEW YEAR OFFER 50% OFF !!! Order Now

NEW YEAR OFFER 50% OFF !!

Lets take Best opinion from our Expert Tutors Today! Order Now