Using Azure Automation DSC to configure and deploy the new SCSM Portal (Part 2)

In the first post, I outlined creating a basic configuration file for DSC to deploy the new HTML5 Self-Service Portal for System Center 2012 R2 Service Manager.

In this post I thought I’d produce a quick video showing adding a server as a DSC node, applying the Configuration to it and checking the configuration applied.

After the video, I thought I’d go into detail about a couple of additions I made to the configuration that weren’t in the first post.

If you just watched the video you’ll have noticed I added more configuration using something called DSC Resources.

Specifically, I used xWebAdministration and xNetworking, both of which can be found on the PowerShell Gallery.

The PowerShell Gallery is the central repository for PowerShell content. You can find new PowerShell commands or Desired State Configuration (DSC) resources in the Gallery.

xWebAdministration Module

xNetworking Module 

Both these modules contain multiple resources that can be used to aid in configuration.

The cool thing here is modules can be either deployed directly from the PowerShell Gallery into your Azure Automation subscription, or along with custom resources, uploaded as a zip file via the Azure Portal.

You can find them within your Assets > Modules section of the portal.

I’m using from the xWebAdministration module the xWebsite resource to change the port of the default web site in IIS from port 80 to 81 so that I can re-utilise port 80 for the new SCSM SSP.

This is done by creating a new xWebsite section named DefaultWebsite and use the BindingInfo section to declare which port the website (Identified in the Name = “Default Web Site” part) should be using.

xWebsite DefaultWebsite
{
Ensure = "Present"
Name = "Default Web Site"
State = "Started"
PhysicalPath = "C:inetpubwwwroot"
BindingInfo = MSFT_xWebBindingInformation
{
Protocol = "HTTP"
Port = 81
}
DependsOn = "[WindowsFeature]WebServer"
}

Deeper details and resources can be found on the projects GitHub site:

I’m doing a similar thing with the xFirewall resource from the xNetworking module to create a new firewall rule

xFirewall SCSMSSPFirewallRule
{
Direction = "Inbound"
Name = "SCSM-SSP-Web-TCP-In"
DisplayName = "SCSM SSP Web Server (TCP-In)"
Description = "Allow incoming web site traffic to SCSM SSP."
DisplayGroup = "PowerONPlatforms"
Enabled = "True"
Action = "Allow"
Protocol = "TCP"
LocalPort = "80"
Ensure = "Present"
}

Deeper details and resources can be found on the projects GitHub site:

This is by no means a production ready example, but does give some basics around using some of the built in resources (WindowsFeature & Package) along with some custom resources (xWebAdministration and xWebsite) and where to go find them (PowerShell Gallery).

Also, please note the SCSM Portal still requires both modifications to the web.config file and the Update 1 hotfix installing afterwards.

View the download details on the Microsoft website

N

Share on Facebook
Share on Twitter
Share on LinkedIn

Related blogs

two people at desk looking at code

AOVPN DPC V4.0 is Now Live!

Today we’re very excited to announce the release of AOVPN DPC 4.0 with support for Windows 11! AOVPN Dynamic Profile Configurator is now functional with