Question 451 · 540 in bank
HOTSPOT - You plan to use Desired State Configuration (DSC) to maintain the configuration of a server that runs Windows Server 2019. The server must have the following features installed: ✑ A web server ✑ An email server How should you complete the DSC configuration file? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:
This is an interactive task on the real exam — a drag-and-drop, hotspot or ordering question. There is nothing to select here, so the answer is shown below for reference.
Show the answer figure
Answer: See figure below
Explanation
Box 1: = @("SMTP-Server", "Web-Server") The following configuration ensures that the Web-Server (IIS) and SMTP (email) Server features, and all subfeatures of each, are installed. configuration FeatureSetTest { Import-DscResource -ModuleName PSDesiredStateConfiguration Node localhost - { WindowsFeatureSet WindowsFeatureSetExample { Name = @("SMTP-Server", "Web-Server") Ensure = 'Present' IncludeAllSubFeature = $true - } } } Box 2: Ensure - Ensure indicates whether the roles or features are added. To ensure that the roles or features are added, set this property to Present. To ensure that the roles or features are removed, set the property to Absent. The default value is Present. Reference: https://docs.microsoft.com/en-us/powershell/dsc/reference/resources/windows/windowsFeatureSetResource
Source: Adapted from community discussion — Atos

