Installation, Storage, and Compute with Windows Server 2016 — Question 248
Your network contains an Active Directory domain named contoso.com. All server run Windows Server 2016.
As a domain administrator, you log on to a server named Server2 and open Windows PowerShell.
You need to establish an interactive PowerShell session to a server named Server1.
Which command should you run?
Answer options
- A. New-PSSession ""Name Server1
- B. Enter-PSSession ""ComputerName Server1
- C. Enable-PSRemoting Server1
- D. Set-PSSession Configuration ""AccessMode Remote ""Name Server1
Correct answer: B
Explanation
The correct answer is B, as the Enter-PSSession command is specifically designed to initiate an interactive session with a remote server. Option A is incorrect because New-PSSession creates a session but does not enter it interactively. Option C, Enable-PSRemoting, is used to enable remote management but does not establish a session. Option D is not relevant for starting an interactive session and focuses on session configurations instead.