First Part of This Script

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

1. ASP.NET 4.

5 role is installed (if needed), the website bits are copied to the server, the default
website is stopped, and the Fabrikam Fiber site is created and started. At the very end, the
configuration is enacted using the specified configuration data.

Figure 1
DSC script

Note: DSC is a PowerShell extension that ships with Windows Server 2012 R2 and Windows
8.1, although you can bring support for DSC down to Windows Server 2008 R2 and Windows 7
by installing the Windows Management Framework 4.0.
2. Most of the configuration modules used here are built into DSC. However, you can use or create
custom modules to tackle other needed tasks. Note that a module named xWebAdministration
is imported at the beginning of the configuration.

Note: The xWebAdministration module contains a number of resources that can be used for
configuring IIS, including xWebsite that is used in this script. You can acquire a number of
different modules for use in DSC scripts from the PowerShell Resource Gallery (currently in
preview form at https://msconfiggallery.cloudapp.net).

3. Note that the xWebAdministration module is included in source control within the Deploy
folder. This folder is deployed with the website, and is therefore available to script that runs on
the target servers during deployment.

Figure 2
xWebAdministration folder deployed with website

4. Now let’s take a quick peek at the configuration script by opening FFDeployConfig.ps1. Note
that although we are looking at this script first, it is actually the first one to run on the server.

Figure 3
Insert Caption

5. The first part of this script places the xWebAdministration module in a discoverable location on
the server. Next, a firewall rule is created to allow traffic in via port 80 if needed. The most
important part to point out is the definition of $ConfigData (which is referenced when the
configuration is enacted).
6.

You might also like