Question: Write a PowerShell script. Your script should perform the following functions in the following order: 1 , Display your name. 2 , Retrieve the current
Write a PowerShell script.
Your script should perform the following functions in the following order:
Display your name.
Retrieve the current date.
Retrieve an alphabetic listing of all currently defined aliases beginning with the letter s
Retrieve configuration details ip configuration, host name, and net statistics to assist with setup issues or performance problems.
Produce a wide format listing for all files in a folder on your computer.
Start the Windows calculator app. Retrieve its Process ID Find out what would happen if you stopped the Calculator. Force a prompt when stopping the Calculator process. Stop the process with a confirmation.
Research $wshShell and popup. Produce a popup box that displays the domain name, user name, and computer name.
Submission
Submit a word processing document containing:
your Powershell script
a screenshot of the output of your script
I got error #~ WriteHost nIP Configuration Details:"
GetNetIPConfiguration
WriteHost nHost Name:"
hostname
WriteHost nNet Statistics Workstation:
net statistics workstationWriteHost nWide format listing of files in C:ExampleFolder
GetChildItem Path C:ExampleFolder FormatWideWriteHost nStarting Calculator..."
StartProcess FilePath "calc.exe"StartSleep Seconds
$calcProcess GetProcess Name "Calculator"
WriteHost "Calculator Process ID:
calcProcess.IdWriteHost nWhat happens if you stop the calculator? Let's try..."
StopProcess Id $
calcProcess.Id Confirm$wshShell NewObject ComObject wScript.Shell
$domain GetWmiObject WinComputerSystemDomain
$username $env:USERNAME
$computername $env:COMPUTERNAME
$wshShell.PopupDomain: $domainnComputer Name: $computername", "System Info",
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
