ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 306 - AZ-400 discussion

Report
Export

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.


Question 306
Correct answer: Question 306

Explanation:

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

asked 02/10/2024
Jarlesi Bolivar
36 questions
User
0 comments
Sorted by

Leave a comment first