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: est\index.htm'
DestinationPath = 'c:\inetpub\wwwroot'
}
Reference:
https://docs.microsoft.com/en-us/powershell/scripting/dsc/quickstarts/website-quickstart