Microsoft Endpoint Administrator — Question 379
Your network contains an Active Directory domain named contoso.com. The domain contains two computers named Computer1 and Computer2 that run Windows 10.
On Computer1, you need to run the Invoke-Command cmdlet to execute several PowerShell commands on Computer2.
What should you do first?
Answer options
- A. On Computer2, run the Enable-PSRemoting cmdlet.
- B. On Computer2, add Computer1 to the Remote Management Users group.
- C. From Active Directory, configure the Trusted for Delegation setting for the computer account of Computer2.
- D. On Computer1, run the New-PSSession cmdlet.
Correct answer: A
Explanation
The correct answer is A because the Enable-PSRemoting cmdlet must be run on the target computer (Computer2) to enable it to accept remote PowerShell commands. The other options are not prerequisites for using Invoke-Command; B is about user permissions, C relates to delegation settings, and D is used to create a new session rather than enabling remoting.