Windows 10 (legacy) — Question 43
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have a computer that runs Windows 10. The computer contains a folder named D:\Scripts. D:\Scripts contains several PowerShell scripts.
You need to ensure that you can run the PowerShell scripts without specifying the full path to the scripts. The solution must persist between PowerShell sessions.
Solution: From System Properties, you add D:\Scripts to the PATH environment variable.
Does this meet the goal?
Answer options
- A. Yes
- B. No
Correct answer: A
Explanation
Adding D: Scripts to the PATH environment variable allows you to run the PowerShell scripts from that folder without needing to type the full path, thus meeting the requirement. This change is persistent across sessions, making it a valid solution. The other option, 'No', is incorrect because it does not recognize the effectiveness of modifying the PATH variable for script execution.