Question: DEBUG the following code: ################## START OF CODE ################## function get-systemInfo () { $computerName! = $env:computername $computerOS = (Get-ItemProperty 'HKLM:SOFTWAREMicrosoftWindows NTCurrentVersion' -Name ProductName).ProductName $osversion =

DEBUG the following code:

################## START OF CODE ##################

function get-systemInfo () { $computerName! = $env:computername $computerOS = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ProductName).ProductName $osversion = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name CurrentBuild).CurrentBuild $network = Get-NetIPAddress -InterfaceAlias "*Ethernet*" -AddressFamily "IPv4" | Select-Object IPAddress $ip = $network.IPAddress Write-Host "Computer Name: $computerName" Write-Host "Operating System: $computerOS $osversion" Write-Host "IP Address: $ips" } get-systemInformation

################## END OF CODE ##################

Once you have successfully got the code to run with no errors, it should look like something similar below...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!