AZ-400 · Question #407
AZ-400 Question #407: Real Exam Question with Answer & Explanation
This question tests knowledge of PowerShell Desired State Configuration (DSC) syntax for installing Windows Server features using the WindowsFeature resource. You must complete a DSC configuration block that installs both a web server (IIS) and an email server (SMTP) feature.
Question
Hotspot Question 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. Answer:
Options
- __typehotspot
- variantdropdown
Explanation
This question tests knowledge of PowerShell Desired State Configuration (DSC) syntax for installing Windows Server features using the WindowsFeature resource. You must complete a DSC configuration block that installs both a web server (IIS) and an email server (SMTP) feature.
Approach. The correct DSC configuration uses the 'WindowsFeature' resource type to declare features that must be present. For a web server, the feature name is 'Web-Server' (IIS), and for an email server, the feature name is 'SMTP-Server'. Each WindowsFeature block requires a unique resource name/label, the 'Name' property set to the Windows feature name, and 'Ensure' set to 'Present' to guarantee the feature is installed. The DSC keyword 'Node' defines the target machine, and each resource block follows the pattern: WindowsFeature <UniqueLabel> { Name = '<FeatureName>'; Ensure = 'Present' }.
Concept tested. PowerShell DSC (Desired State Configuration) configuration file syntax, specifically the use of the WindowsFeature DSC resource with correct feature names ('Web-Server' for IIS and 'SMTP-Server' for email), the 'Ensure = Present' property, and proper DSC configuration block structure including Configuration, Node, and WindowsFeature keywords.
Topics
Community Discussion
No community discussion yet for this question.