Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#1A. Write the PowerShell syntax to get a list of installed software by using the Get-WmiObject cmdlet with the class Win32_Product # Format the results

#1A. Write the PowerShell syntax to get a list of installed software by using the Get-WmiObject cmdlet with the class "Win32_Product" # Format the results as a list displaying the properties Name, Vendor, and Version

#1B. Complete the same task as question 1A, but use Get-CimInstance rather than Get-WmiObject

#2A. Write the PowerShell syntax to obtain the Manufacturer and Model of your local computer. # Use Get-WmiObject with the Class "Win32_Computersystem" and the default NameSpace. # Only display the properties Manufacturer and Model in list format

#2B. Complete the same task as question 2A, but use Get-CimInstance rather than Get-WmiObject

#2C. Write the PowerShell syntax to obtain the Manufacturer and Model from a remote computer: the remote computer listed in the file ComputerNames.txt # Use Invoke-Command to access the remote computers # Only the Get-WmiObject or Get-CimInstance command should run on the remote computers (you choose which Cmdlet to use) # Pipe the results of the Invoke-Command to local Cmdlets (See Below): # Sort the returned info by PSComputername and format as a list showing the properties Manufacturer, Model, and PSComputerName (happens locally)

#3. Use Enter-PSSession to code a One-to-One remote connection to Client1. Once connected to Client1, complete the following tasks on Client1: <# -Add a Printer Port Named "HP219" with an IP Address (PrinterHostAddress) of 192.168.219.6 -Code a variable named $Driver and use a parenthetical to extract the Name (as string) of the Print Driver where the name contains the word "Universal" The results of the parenthetical should store the Print Driver name within the variable -Code a variable named $Port and use a parenthetical to extract the Name (as string) of the Printer Port where the name is "HP219" The results of the parenthetical should store the Print Driver name within the variable -Add a printer named "HP219-Printer", use the variables you created to pass info to the -DriverName and -PortName parameters -Use Get-Printer to make sure the printer was created succesfully. -Finally, disconnect the remote One-to-One connection to Client1 #>

#4. Use Invoke-Command to code a One-to-Many Remote Connection to remote computer (Using Variables) <# -Code a variable named "$Computers" and use a parenthetical to get content from the ComputerNames.txt file (Make sure you have copied the ComputerNames.txt file to the root of drive C:\ before trying this) The results of the parenthetical should store the Computer Name(s) within the variable -Code a variable named "$Cred" and use a parenthetical with the Get-Credential cmdlet Run this line of code and it will prompt you for the Username and Password for the remote computer. The results of the parenthetical should store the Username and Password within the variable -Code a variable named "$SB4" and use a set of curly brackets {} to store all the commands you intend to send to the remote computers The scriptblock of commands should be stored within the variable -Have the remote computers do the following tasks (all these tasks should happen on remote computers): Use the Get-PSDrive cmdlet to retrieve info about the "C" drive Use a filter so that only results where the free space is less than 100 are returned Note: This syntax should be written within the $SB4 variable -Use invoke-command with the variables as input for the parameters -ComputerName, -ScriptBlock, and -Credential. -Pipe the results of invoke-command to other cmdlets locally to achieve the following tasks (all these tasks should happen locally): Sort by PSComputername (lowest to highest) Format-table with three properties -Custom Property "DriveLetter" (from the Name property) -Custom Property "FreeSpace" (from Free property) (Should be in GB, displayed as INT, and left aligned) -PSComputerName #>

#5. Use Invoke-Command to Code a One-to-Many Remote Connection to a remote computer and send script to complete. <# Step 1: Code Script named "AssessmentModule1.PS1" and save script on C:\ -The Script should complete the following Tasks: Obtain a list of processes. Filter the PowerShell Process out of the output Sort the Processes by CPU with the highest CPU usage at the top of the list Only display the 10 processes with the highest CPU usage Format the output in a table (Display only three properties: ProcessName, ID, and CPU), and alter the display of the CPU info by showing only 2 decimal places Lastly, save the results to a txt file named ProcessCPU.txt on the root of C:\ Step 2: Use Invoke-Command to run script on remote computers -Reuse the variables "$Cred" and "$Computers" created in question 4. -Use the -FilePath parameter to send the script named "AssessmentModule1.PS1" to the remote computers Step 3: Use Invoke-Command to ensure the file output of the script ("C:\ProcessCPU.txt") was created successfully on the remote computer #> #Step 4: Write the PowerShell syntax to delete the C:\ProcessCPU.txt from Client1 without being prompted. #Then write the PowerShell syntax to show that it has been deleted

#6. # Note: Make sure you have Download the ProgramInstall.zip file from Blackboard, Unzip it, and copy the unzipped folder to the root of # drive C:\ on AdminPC, also copy it to the root of drive C:\ on Client1

#Step 1: # Write the PowerShell syntax to install Java 32bit and 64bit # You will write two separate commands; one to install the 32bit and another to install the 64bit # Use the cmdlet "Start-Process" to accomplish the installations # The required argument needed by the Java installer to install silently is "INSTALL_SILENT=Enable" # Make each command wait until the installation is completed before processing the next command

#Step 2: # Write the PowerShell syntax to verify that Java 32bit and 64bit are installed # Use either Get-WmiObject or Get-CimInstance with the class "Win32_Product" to obtain all installed software # Pipe the results of the Get-WmiObject or Get-CimInstance cmdlet to Where-Object and filter for software named Java

#Step 3: # Write the PowerShell syntax to install Java 32bit and 64bit on remote computers listed in the file ComputerNames.txt using Invoke-Command # Also write the PowerShell syntax to verify that Java 32bit and 64bit are installed on the remote computers

#Step 4: # You will eventually have to update Java on all computers, before doing so, it is best practice to uninstall the old version(s) first # Write the PowerShell syntax to uninstall Java 32bit and 64bit on the local computer # Once you have completed the uninstall, write the PowerShell syntax to verify that the software is no longer installed

#Step 5: # Write the PowerShell syntax to uninstall Java 32bit and 64bit on remote computers listed in the file ComputerNames.txt

#Step 6: # Once you have completed the uninstall of Java on the remote computer, write the PowerShell syntax to verify that the software # is no longer installed on the Remote Computer

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 For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

=+ What topics are contained in the contracts?

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago