exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 7 question 84 discussion

Actual exam question from Microsoft's AZ-400
Question #: 84
Topic #: 7
[All AZ-400 Questions]

HOTSPOT -
You plan to use Desired State Configuration (DSC) to maintain the configuration state of virtual machines that run Windows Server.
You need to perform the following:
✑ Install Internet Information Services (IIS) on the virtual machines.
✑ Update the default home page of the IIS web server.
How should you configure the DSC configuration file? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: WindowsFeature -
Example:
Configuration WebsiteTest {
# Import the module that contains the resources we're using.
Import-DscResource -ModuleName PsDesiredStateConfiguration
# The Node statement specifies which targets this configuration will be applied to.
Node 'localhost' {
# The first resource block ensures that the Web-Server (IIS) feature is enabled.
WindowsFeature WebServer {
Ensure = "Present"
Name = "Web-Server"
}

Box 2: File -
Example continued:
# The second resource block ensures that the website content copied to the website root folder.
File WebsiteContent {
Ensure = 'Present'
SourcePath = 'c:\test\index.htm'
DestinationPath = 'c:\inetpub\wwwroot'
}
Reference:
https://docs.microsoft.com/en-us/powershell/scripting/dsc/quickstarts/website-quickstart

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
tjeerd
Highly Voted 2 years, 4 months ago
Got this question on exam 20220727, with slightly different code (but same answer nonetheless). Given answer is correct.
upvoted 11 times
...
Amrx
Highly Voted 2 years, 5 months ago
IIS is a Windows Feature Ref: https://docs.microsoft.com/en-us/powershell/dsc/quickstarts/website-quickstart?view=dsc-1.1
upvoted 8 times
...
vsvaid
Most Recent 11 months, 2 weeks ago
Correct answer
upvoted 1 times
...
zellck
1 year, 6 months ago
1. WindowsFeature 2. File https://learn.microsoft.com/en-us/powershell/dsc/quickstarts/website-quickstart?view=dsc-1.1#write-the-configuration
upvoted 6 times
...
syu31svc
2 years, 3 months ago
Given answer is correct and provided link supports it
upvoted 4 times
...
kennynelcon
2 years, 4 months ago
IIS is an Optional Feature https://docs.microsoft.com/en-us/iis-administration/api/installing-features Answer: WindowsOptionalFeature File
upvoted 2 times
kennynelcon
2 years, 4 months ago
Error, Armx comment is accurate
upvoted 2 times
...
...
mclovin
2 years, 4 months ago
To enable IIS you type "WindowsFeature WebServer" Given answers are correct reference: https://docs.microsoft.com/en-us/powershell/dsc/quickstarts/website-quickstart?view=dsc-1.1&viewFallbackFrom=powershell-7.2
upvoted 2 times
...
Divyayuvi
2 years, 5 months ago
Correct Answer Should be Optional Feature File. IIS is an optional windows feature
upvoted 2 times
Mcs_
1 year, 7 months ago
IIS is a Windows Feature. Link: https://learn.microsoft.com/en-us/iis/application-frameworks/scenario-build-an-aspnet-website-on-iis/configuring-step-1-install-iis-and-asp-net-modules
upvoted 1 times
...
...
Brexten
2 years, 7 months ago
Looks right. IIS is definitely a WindowsFeature and not an optional one.
upvoted 4 times
...
U3
2 years, 7 months ago
Given answer is correct!
upvoted 3 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 ...