exam questions

Exam MD-102 All Questions

View all questions & answers for the MD-102 exam

Exam MD-102 topic 1 question 67 discussion

Actual exam question from Microsoft's MD-102
Question #: 67
Topic #: 1
[All MD-102 Questions]

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?

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Jz23
2 months, 3 weeks ago
Selected Answer: A
A. On Computer2, run the Enable-PSRemoting cmdlet. Explanation: To use the Invoke-Command cmdlet for remote management, PowerShell Remoting must be enabled on the target computer (in this case, Computer2). Enable-PSRemoting configures the necessary settings, including starting the WinRM service, setting up listeners, and configuring the firewall rules to allow remote PowerShell commands. Why not the others? B. Add Computer1 to the Remote Management Users group: This is useful for non-administrator accounts, but it's not the first step. Remoting must be enabled first. C. Configure Trusted for Delegation: This is used for Kerberos delegation scenarios, not basic PowerShell Remoting. D. Run New-PSSession on Computer1: This initiates a remote session, but it will fail if PowerShell Remoting is not enabled on Computer2.
upvoted 1 times
...
Darkfire
8 months, 2 weeks ago
Selected Answer: A
A is correct https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-7.4
upvoted 3 times
...
Tonsku
10 months, 2 weeks ago
Selected Answer: A
A. On Computer2, run the Enable-PSRemoting cmdlet.
upvoted 1 times
...
belyo
10 months, 3 weeks ago
Selected Answer: A
1] Enable-PSRemoting 2] To verify that remoting is configured correctly use New-PSSession which creates a remote session on the local computer
upvoted 1 times
...
VirtualJP
1 year ago
Selected Answer: A
Answer is correct
upvoted 2 times
...
Temptset
1 year ago
Selected Answer: A
"PowerShell remoting is enabled by default on Windows Server platforms. You can use Enable-PSRemoting to enable PowerShell remoting on other supported versions of Windows and to re-enable remoting if it becomes disabled." https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-6 The key is "enabled by default on SERVER...", not the client (Windows 10/11). You have to enable it first.
upvoted 2 times
...
Alscoran
1 year ago
Selected Answer: A
As Futfuyfujfj says... https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_requirements?view=powershell-7.3
upvoted 1 times
...
Rocky83
1 year ago
Selected Answer: D
According to this article: To run a single command on a remote computer, use the ComputerName parameter. To run a series of related commands that share data, use the New-PSSession cmdlet to create a PSSession (a persistent connection) on the remote computer, and then use the Session parameter of Invoke-Command to run the command in the PSSession. To run a command in a disconnected session, use the InDisconnectedSession parameter. To run a command in a background job, use the AsJob parameter.
upvoted 1 times
picho707
1 year ago
You do not need to run the New-PSSession cmdlet before running the Invoke-Command cmdlet. The Invoke-Command cmdlet will automatically create a new PowerShell session if one does not already exist.
upvoted 3 times
...
...
Futfuyfyjfj
1 year, 1 month ago
Not 100% sure but looks correct: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_requirements?view=powershell-7.3
upvoted 3 times
Rocky83
1 year ago
same here
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago