Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For Questions 7, 8, and 9, use the following PowerShell script. The line numbers are provided for reference and should not be typed in when
For Questions 7, 8, and 9, use the following PowerShell script. The line numbers are provided for reference and should not be typed in when you run this script: 1: function Update-MyVar { $myVar = $myvar + 1 Write-Host "MyVar contains '$myVar'" 3: 4: 5: $myVar = 1 Write-Host "MyVar contains '$myVar'" Update-MyVar Write-Host "MyVar contains 'SmyVar'" 7: 8: 7. If the script were dot-sourced, indicate the value of myVar in the below scopes, as you did in Question 7. Line Number Global Script Function 3 For Questions 7, 8, and 9, use the following PowerShell script. The line numbers are provided for reference and should not be typed in when you run this script: 1: function Update-MyVar { $myVar = $myvar + 1 Write-Host "MyVar contains '$myVar'" 3: 4: 5: $myVar = 1 Write-Host "MyVar contains '$myVar'" Update-MyVar Write-Host "MyVar contains 'SmyVar'" 7: 8: 7. If the script were dot-sourced, indicate the value of myVar in the below scopes, as you did in Question 7. Line Number Global Script Function 3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started