You have a server named Server1 that runs Windows Server 2016.
You need to install the DNS Server role on Server1.
What should you run?

A.
the Install-Package cmdlet
B.
the setup.exe command
C.
the dnscmd.exe command
D.
the Enable-WindowsOptionalFeature cmdlet
E.
the Add-WindowsPackage cmdlet
Explanation:
D
More there:
https://peter.hahndorf.eu/blog/WindowsFeatureViaCmd.html
https://www.briefmenow.org/microsoft/you-need-to-install-the-dns-server-role-on-server1/
1
0
If server1 is a Nano server then D is correct, see https://blogs.technet.microsoft.com/teamdhcp/2015/12/04/how-to-deploy-windows-dns-server-on-nano-server/
1
0
All provided answers are wrong based on question wording.
Correct answer: InstallWindowsFeature
The provided answer would work for Nano server as pointed out by Feedback.
0
3
D. Was tested less than 10 sec ago. It works, the syntax is:
Enable-WindowsOptionalFeature -Online -FeatureName DNS-Server-Full-Role
Installation took less than 10 sec on Azure WS 2016 Datacenter with 4 CPUs and 16GB.
7
0
Agree with pekah74.
Tested in my Windows server2016 VM:
Enable-WindowsOptionalFeature -Online -FeatureName DNS-Server-Full-Role
See the image below:
https://ibb.co/fgwiR7
4
0