<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>AutoMagically</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/automagically/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/automagically/feed.xml</link>
    <description>About Automation and PowerShell</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:57:12 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Export / Import Variables to Azure Automation</title>
      <link>https://docs.microsoft.com/archive/blogs/automagically/export-import-variables-to-azure-automation</link>
      <pubDate>Tue, 05 Jun 2018 09:58:48 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Watherston]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/automagically/?p=1245</guid>
      <description><![CDATA[For unencrypted variables in an Azure Automation account - the script linked here will export or...]]></description>
      <content:encoded><![CDATA[For unencrypted variables in an Azure Automation account - the script linked <a href="https://github.com/anwather/AzureRandom/blob/master/Manage-Variables.ps1">here</a> will export or import them. Usage is

Manage-Variables.ps1 [-AutomationAccountName] &lt;string&gt; [-ResourceGroupName] &lt;string&gt; [-Path] &lt;string&gt; [-Mode] &lt;string]]></content:encoded>
    </item>
    <item>
      <title>Azure Service Principal in Jenkins</title>
      <link>https://docs.microsoft.com/archive/blogs/automagically/azure-service-principal-in-jenkins</link>
      <pubDate>Wed, 18 Apr 2018 09:45:14 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Watherston]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/automagically/?p=1185</guid>
      <description><![CDATA[A quick update to a previous post - below is how to add an Azure Service Principal to a Jenkins job...]]></description>
      <content:encoded><![CDATA[A quick update to a previous post - below is how to add an Azure Service Principal to a Jenkins job - then use it to authenticate to Azure using PowerShell Core.
<ol>
 	<li>Ensure that the Azure AD Plugin is installed in the Jenkins instance - it requires a restart of the service.<img width="1126" height="114" class="alignnone size-full wp-image-1195" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/04/02.png" /></li>
 	<li>Add a new credential - select Microsoft Azure Service Principal<img width="1501" height="285" class="alignnone size-full wp-image-1205" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/04/17.png" /></li>
 	<li>Fill in the details from your application. <img width="2048" height="772" class="alignnone size-large wp-image-1225" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/04/37-2048x772.png" /></li>
 	<li>Click <strong>Verify Service Principal</strong>. If it is working you should get a success message.</li>
</ol>
When using the service principal in a job.
<ol>
 	<li style="list-style-type: none">
<ol>
 	<li>Ensure that the Use secret text or file(s) is ticked and select the service principal. <img width="1625" height="682" class="alignnone size-full wp-image-1235" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/04/45.png" /></li>
 	<li>In the ps1 file - add the following function (or create a module on the Jenkins node) - the you can just call it to authenticate to Azure.</li>
</ol>
</li>
</ol>
<code>
function Connect-AzureJenkins {
$tenantId = $env:AZURE_TENANT_ID
$username = $env:AZURE_CLIENT_ID
$password = ConvertTo-SecureString -String $env:AZURE_CLIENT_SECRET -AsPlainText -Force
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $password
Add-AzureRmAccount -ServicePrincipal -Credential $credential -TenantId $tenantId
}
</code>]]></content:encoded>
    </item>
    <item>
      <title>PowerShell Core and Jenkins</title>
      <link>https://docs.microsoft.com/archive/blogs/automagically/powershell-core-and-jenkins</link>
      <pubDate>Tue, 23 Jan 2018 17:25:41 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Watherston]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/automagically/?p=935</guid>
      <description><![CDATA[I have been working with a customer who wants to get some usage data from Azure around virtual...]]></description>
      <content:encoded><![CDATA[I have been working with a customer who wants to get some usage data from Azure around virtual networks and available IP addresses. Specifically how many IP addresses are available in a subnet within an Azure virtual network. This is a simple enough script and I can use the Get-AzureRMVirtualNetworkUsageList cmdlet to get the exact information. However the customer's environment has some challenges.
<ul>
 	<li>It has to be non-interactive (eventually this script will run as part of their build process)</li>
 	<li>They are using Jenkins to run the script</li>
 	<li>Jenkins is on a Linux box and I can't add a Windows slave</li>
 	<li>Azure CLI is installed but won't get me the information I need</li>
</ul>
This post explains how I overcame these hurdles using the new cross platform capability of PowerShell Core.

<strong>Non-Interactive Azure Login</strong>

To be able to authenticate with Azure I need to use a token - this is so I don't have to run Login-AzureRMAccount and the process can work unattended. For this I have to create a new application in Azure so I can authenticate.

In Azure Active Directory - I create a new application. Click on New application registration.<a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-37-46.png"><img width="384" height="33" class="alignnone wp-image-945" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-37-46.png" /></a>

Fill in some details about the application and click Create.

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-38-40.png"><img width="301" height="255" class="alignnone wp-image-955" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-38-40.png" /></a>

I need to generate a client secret for use with my login - select the application and click on Settings -&gt; Keys.

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-41-171.png"><img width="568" height="303" class="alignnone wp-image-985" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-41-171-1024x547.png" /></a>

Enter a description for the key and click Save. A secret will be generated - you must copy and save it somewhere because when you close the blade it will be unaccessible again. This secret will be used in the script run by Jenkins.

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-42-32.png"><img width="488" height="204" class="alignnone wp-image-975" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-42-32-1024x428.png" /></a>

Now that the application is created we can update the script with the application ID.

<strong>Script to calculate available IP addresses.</strong>

The script I use is located at https://github.com/anwather/SubnetCount and performs the following steps.
<ol>
 	<li>Logs in to Azure using the application created above</li>
 	<li>For each virtual network it iterates through the subnets and calculates how many IP addresses are available.</li>
</ol>
Very simple - but it makes for a quick example.

<strong>Provision and Configure Jenkins</strong>

I can create a Jenkins instance using the Azure marketplace image which will do all the work of setting up a virtual machine and installing the product for me.

In Azure I search for Jenkins in the marketplace.

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-55-13.png"><img width="535" height="169" class="alignnone wp-image-995" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-55-13-1024x324.png" /></a>

Select it and click Create.

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-56-07.png"><img width="455" height="621" class="alignnone wp-image-1005" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_14-56-07-750x1024.png" /></a>

Step through the wizard and complete the details required - Azure will complain if you use any reserved names. You can also select instance size. I have screenshots below of the changes I made - for anything not listed I just used the default settings.

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_15-28-02.png"><img width="243" height="427" class="alignnone wp-image-1015" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_15-28-02-583x1024.png" /></a><a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_15-30-19.png"><img width="254" height="424" class="alignnone wp-image-1025" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_15-30-19-615x1024.png" /></a>

When complete click Create - the deployment will begin and the portal will notify you when it is complete.

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_15-33-39.png"><img width="396" height="145" class="alignnone wp-image-1035" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-19_15-33-39.png" /></a>

<strong>Configuring Jenkins and PowerShell Core</strong>

To configure Jenkins you can follow the steps at https://docs.microsoft.com/en-us/azure/jenkins/install-jenkins-solution-template. First we have to connect to the Jenkins instance running in Azure by browsing to its URL. In the virtual machine you have created it will be listed in the overview page under DNS Name.

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-23_14-35-561.png"><img width="436" height="107" class="alignnone wp-image-1065" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-23_14-35-561.png" /></a>

Browse to this and when the Jenkins page appears click Log in.

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-23_14-34-04.png"><img width="588" height="210" class="alignnone wp-image-1055" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-23_14-34-04-1024x366.png" /></a>

Because we don't want anyone to be able to log in to your instance we disable the public IP on it - you have to use ssl to connect and forward the port to your local machine. I use the Bash shell on Windows 10 and just follow the instructions replacing the username with my username. You will have to enter Yes to accept the host thumbprint and also enter your password for the Jenkins instance. When complete you should be presented with a login as below.

<img width="2048" height="802" class="alignnone size-large wp-image-1075" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/441-2048x802.png" />

Let's install PowerShell Core on the Jenkins box. I follow the instructions at https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#ubuntu-1604 and simply copy and paste the commands in the section below into the command prompt.

<img width="1755" height="561" class="alignnone size-full wp-image-1085" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-23_14-45-42.png" />

The full output from this will look similar to the image below. At the bottom of the image is where I launch PowerShell (pwsh)

<img width="2048" height="1704" class="alignnone size-large wp-image-1095" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-23_14-46-33-2048x1704.png" />

Now I can just install the modules for AzureRM Networking,Profile and Resources by running the command below.

Install-Module AzureRM.Profile.NetCore,AzureRM.Network.NetCore -Force

<img width="366" height="133" class="alignnone wp-image-1105" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-23_14-52-00.png" />

Don't close the terminal window as we can now configure the job in Jenkins.

<strong>Creating and Running the Jenkins Build</strong>

Open the web browser to http://localhost:8080. The Jenkins page should appear and you can click on Login. You can use the username "admin" - the initial password can be retrieved by running <span>sudo cat /var/lib/jenkins/secrets/initialAdminPassword</span> at the terminal prompt. Once you have logged in click New Item and select Freestyle Project. Click ok.

<img width="665" height="162" class="alignnone wp-image-1175" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/ngang.png" />

In the section marked Source Code Management select git and enter the repository information as in the image.

<img width="618" height="364" class="alignnone wp-image-1145" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-23_17-39-30.png" />

In the section Build click Add Build Step -&gt; Execute Shell. Enter the command as below replacing the sections with the information from your Azure Service Principal you created earlier.

pwsh -File "IPUsage.ps1" -TenantID &lt;&lt;your tentant ID&gt;&gt; -ClientID &lt;&lt;your client ID&gt;&gt; -ClientSecret &lt;&lt;your client secret&gt;&gt;

Click on Save and then Click Build Now - you will see the build start...

<img width="301" height="110" class="alignnone wp-image-1155" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-23_17-55-20.png" />

Click on the number of the build and select console output. You should see the network details from your Azure subscription.

<img width="891" height="489" class="alignnone wp-image-1165" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/01/2018-01-23_17-55-55-2048x1125.png" />

So this is just an example that when faced with the possibility of writing a script in Azure CLI or Shell, now we have the option of using PowerShell Core instead.]]></content:encoded>
    </item>
    <item>
      <title>Continuous Deployment to Azure Automation DSC Part 4</title>
      <link>https://docs.microsoft.com/archive/blogs/automagically/continuous-deployment-to-azure-automation-dsc-part-4</link>
      <pubDate>Fri, 21 Jul 2017 11:10:26 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Watherston]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/automagically/?p=855</guid>
      <description><![CDATA[Picking this series up after a break. Last time I mentioned I wanted to be able to add multiple...]]></description>
      <content:encoded><![CDATA[Picking this series up after a break. <a href="https://blogs.technet.microsoft.com/automagically/2017/04/12/continuous-deployment-to-azure-automation-dsc-part-3/">Last time</a> I mentioned I wanted to be able to add multiple configurations and ensure they compiled as well. What I did to my source directory was simply clone the sample configuration I've made. As Azure Automation DSC treats them as different configurations I just kept all the settings for the configuration exactly the same. I copied the configuration and commit it to the dev branch to begin the build.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/130.png"><img width="558" height="299" class="wp-image-856 aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/130.png" /></a>

I'll use a pull request to pull the contents of my configtesting branch into the dev branch. In VSTS go to the code section and ensure the correct branch is selected. Then I just click on Create a Pull Request.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/226.png"><img width="547" height="296" class="wp-image-866 aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/226.png" /></a>

Make sure the correct details are filled in and then click Create (I could add reviewers if I wanted someone to check the code or link a work item to the request)

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/311.png"><img width="724" height="209" class="wp-image-875 aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/311-1024x295.png" /></a>

I can then go and complete the pull request.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/414.png"><img width="334" height="243" class="wp-image-885 aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/414-1024x746.png" /></a>

The build gets automatically triggered (by a change to the dev branch) and completes successfully without me having to change anything. If I check the artifact which is created I now have my SecondConfigurationDEV.ps1 file in there ready for publishing to the Azure Automation service.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/510.png"><img width="433" height="303" class="wp-image-895 aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/510.png" /></a>

I can go and manually trigger the release for the DEV configurations.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/68.png"><img width="299" height="192" class="wp-image-905 aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/68-1024x657.png" /></a>

And when it is complete I can see the new DEV configuration in Azure Automation DSC.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/79.png"><img width="571" height="303" class="wp-image-915 aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/79-1024x543.png" /></a><a href="https://msdnshared.blob.core.windows.net/media/2017/07/86.png"><img width="525" height="190" class="wp-image-916 aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/86-1024x370.png" /></a><a href="https://msdnshared.blob.core.windows.net/media/2017/07/79.png"></a>

Not too hard? Well it is about to get hard.... I still need to work out how to actually test the configurations before releasing them - they can compile which is fine but will they actually work in my environment and I still need to handle credentials. I can do that using Azure Automation DSC but I'm concerned about the time to actually register the node and test the configuration. In the next post I'll try and use an on premises build agent to actually run and test the configurations can apply.]]></content:encoded>
    </item>
    <item>
      <title>Continuous Deployment to Azure Automation DSC Part 3</title>
      <link>https://docs.microsoft.com/archive/blogs/automagically/continuous-deployment-to-azure-automation-dsc-part-3</link>
      <pubDate>Wed, 12 Apr 2017 14:07:33 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Watherston]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/automagically/?p=815</guid>
      <description><![CDATA[Following on from the previous post - this time I create a separation between development and...]]></description>
      <content:encoded><![CDATA[Following on from the <a href="https://blogs.technet.microsoft.com/automagically/2017/04/12/continuous-deployment-to-azure-automation-dsc-part-2/">previous post </a>- this time I create a separation between development and production.

I've created a build script to be used in the dev environment - it scans each of the script files and if the first line matches "Configuration" then it appends a DEV suffix to the configuration name and creates a new file name &lt;&lt;Configuration&gt;&gt;DEV.ps1. This allows me to create a new version of an existing configuration so I don't affect the production configurations.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412132402.png"><img width="518" height="350" class="alignnone wp-image-825" alt="snip_20170412132402" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412132402-1024x692.png" /></a>

I had to make a change to the dev build task so it would run my new PowerShell script so I added in a new task to the build as below.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412132639.png"><img width="1024" height="326" class="alignnone size-large wp-image-835" alt="snip_20170412132639" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412132639-1024x326.png" /></a>

I also updated the Copy Publish Artifact step to include all files.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412132648.png"><img width="1024" height="387" class="alignnone size-large wp-image-845" alt="snip_20170412132648" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412132648-1024x387.png" /></a>

What this has allowed me to do is create an artifact with my dev configuration - my release script has also had some smarts added to it so it grabs all the *DEV.ps1 configurations and publishes and compiles them.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412133320.png"><img width="885" height="236" class="alignnone wp-image-846" alt="snip_20170412133320" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412133320-1024x273.png" /></a>

When I transfer these changes to the production release (triggered by a merge to master) all I've had to do is update my release production script to publish and compile any configurations not including DEV in the name.

So far so good - next step will be to introduce multiple configurations and make sure I can process them.]]></content:encoded>
    </item>
    <item>
      <title>Continuous Deployment to Azure Automation DSC Part 2</title>
      <link>https://docs.microsoft.com/archive/blogs/automagically/continuous-deployment-to-azure-automation-dsc-part-2</link>
      <pubDate>Wed, 12 Apr 2017 11:43:37 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Watherston]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/automagically/?p=755</guid>
      <description><![CDATA[This is a continuation from the post here where I created a build and release pipeline for my DSC...]]></description>
      <content:encoded><![CDATA[This is a continuation from the post <a href="https://blogs.technet.microsoft.com/automagically/2017/04/11/continous-deployment-to-azure-automation-dsc/">here</a> where I created a build and release pipeline for my DSC configurations. This post looks at attaching some process around when a build and release should be completed.

I've used my dev branch in Git for a development build and the master branch for a production release. This means that when someone changes the dev branch a build will be automatically triggered and same for the master branch. To do this I had to perform a couple of steps for the build process. Aside from renaming to make more sense - I basically cloned the existing build process and modified it for the master branch.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412103822.png"><img width="593" height="190" class="alignnone wp-image-756" alt="snip_20170412103822" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412103822-1024x328.png" /></a>

Each branch has a trigger set on it to perform a build when the corresponding branch is updated...

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412103918.png"><img width="424" height="343" class="alignnone wp-image-765" alt="snip_20170412103918" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412103918-1024x829.png" /></a>

I also create a production artifact now - this allows me to trigger a release when a new artifact is created.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412103935.png"><img width="453" height="238" class="alignnone wp-image-775" alt="snip_20170412103935" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412103935-1024x539.png" /></a>

I created a new script to be added to this artifact for the production release. It does exactly the same as the dev one however uses a different path (different artifact path generated). I want to later on be able to update the development process to be able to release a dev DSC configuration which won't affect my production machines.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412104454.png"><img width="920" height="169" class="alignnone wp-image-776" alt="snip_20170412104454" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170412104454-1024x188.png" /></a>

Doing that takes care of the build process - now for the release. Aside from some cosmetic changes it is exactly the same as the development release process however I updated the script to be the ReleasePROD.ps1 file.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_201704121038221.png"><img width="796" height="255" class="alignnone wp-image-785" alt="snip_20170412103822" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_201704121038221-1024x328.png" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_201704121039181.png"><img width="508" height="411" class="alignnone wp-image-795" alt="snip_20170412103918" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_201704121039181-1024x829.png" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_201704121039351.png"><img width="563" height="296" class="alignnone wp-image-805" alt="snip_20170412103935" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_201704121039351-1024x539.png" /></a>

All tested and working after a couple of minor changes - but now I have a process as follows, VSTS allows me to lock down my branches in source control so I can control who can merge.
<ol>
 	<li>User creates a new branch and adds/updates a configuration.</li>
 	<li>They submit a pull request to add their changes to the dev branch (they don't have permissions to modify dev)</li>
 	<li>I approve the pull request and the build to dev is triggered.</li>
 	<li>If it passes I can then trigger a dev release which uploads and compiles the configuration. I still need to find a way to mark a configuration as a dev configuration so it doesn't change production nodes.</li>
 	<li>When this is all done and tested - I can submit a pull request to pull the dev branch into master.</li>
 	<li>Once approved it will trigger a build for production - the generated artifact then triggers a release into production.</li>
</ol>
So my process is coming together - next steps are to refine and separate the configurations between development and production. Of course this still for configurations that have no external resources or credentials - that is going to add a new layer of complexity.]]></content:encoded>
    </item>
    <item>
      <title>Continuous Deployment to Azure Automation DSC Part 1</title>
      <link>https://docs.microsoft.com/archive/blogs/automagically/continous-deployment-to-azure-automation-dsc</link>
      <pubDate>Tue, 11 Apr 2017 21:23:28 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Watherston]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/automagically/?p=616</guid>
      <description><![CDATA[Update: Part 2 is located here and Part 3 is here

I've been recently involved in creating some...]]></description>
      <content:encoded><![CDATA[Update: Part 2 is located <a href="https://blogs.technet.microsoft.com/automagically/2017/04/12/continuous-deployment-to-azure-automation-dsc-part-2/">here</a> and Part 3 is <a href="https://blogs.technet.microsoft.com/automagically/2017/04/12/continuous-deployment-to-azure-automation-dsc-part-3/">here</a>

I've been recently involved in creating some DSC configurations and using Azure Automation DSC to host them. However what I wanted was a way to continuously deploy the configurations and have them updated on the servers as they are altered in source control. There are so many moving parts involved in this that I thought I should detail what I have done. I started by defining what I want to happen (or think should happen) and then working the automation around it.
<ol>
 	<li>I create a new configuration or update an existing one</li>
 	<li>Something recognises that a new configuration has been created (or updated)</li>
 	<li>That configuration is copied to the Azure Automation DSC service and compiled</li>
</ol>
It seems simple enough but I want the whole process integrated with Visual Studio Team Services - this enables me to break the tasks down into smaller parts but also introduces new layers of complexity.
<ol>
 	<li>I know I can use VSTS to build the configuration file and run tests etc.</li>
 	<li>When the build is completed I can use release management in VSTS to deploy and compile the configuration.</li>
 	<li>I need to use source control to trigger the build / release process.</li>
</ol>
Following along? Lets start with the basics - creating a new project in VSTS - I can fill in all the other parts later. I already have a VSTS account so I can just create a new project. Let me prefix this by saying it is my approach and may not be correct :)

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411200834.png"><img width="591" height="474" class="alignnone wp-image-625" alt="snip_20170411200834" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411200834-1024x821.png" /></a>

Created the project...

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411200931.png"><img width="455" height="346" class="alignnone wp-image-635" alt="snip_20170411200931" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411200931-1024x779.png" /></a>

Initialized the repository and added a readme file...

This will allow me to clone the repository to my local machine - which I've done below. The plan is to be able to trigger a build when dev branch is updated, and trigger a release when the master branch is updated but that looks a long way off at the moment. Let's get some simple stuff out of the way and make sure that the basics work.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411200955.png"><img width="690" height="563" class="alignnone wp-image-655" alt="snip_20170411200955" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411200955-1024x835.png" /></a>

First I create a super basic server configuration - no parameters, no configuration data required - so no issues yet.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201004.png"><img width="660" height="492" class="alignnone wp-image-656" alt="snip_20170411201004" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201004-1024x764.png" /></a>

Couldn't get much simple than this - it is fairly guaranteed that if my node has a C drive then it can create this one folder.

So let's work through the steps to get it into an Azure Automation account - I have one created with nothing in it as yet..... That is going to give me a place to host my configurations and compile them.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201013.png"><img width="745" height="341" class="alignnone wp-image-665" alt="snip_20170411201013" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201013.png" /></a>

With that in place - in the most simplest of simple ways I have everything I need to begin deploying my configurations to Azure Automation. Forgoing tests, script analysis and probably a few other requirements in the CI/CD pipeline I can create a simple Build task which simply outputs my configuration.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201023.png"><img width="1024" height="382" class="alignnone size-large wp-image-666" alt="snip_20170411201023" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201023-1024x382.png" /></a>

I only require a single task which outputs a build artifact - this is required for me release later on, I will fix and refine the process later on.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201032.png"><img width="449" height="342" class="alignnone wp-image-676" alt="snip_20170411201032" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201032.png" /></a>

Run my build.....

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201045.png"><img width="232" height="280" class="alignnone wp-image-685" alt="snip_20170411201045" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201045.png" /></a>

You can scroll through the output and see what is done - basically it clones my repository to the hosted agent (here is where I can run a build script and maybe some tests) then copies my script to location as a build artifact. At this point I kind of realised that I don't actually know what a build artifact is or where it goes - I had to play around to work out what it had done. But my build completed and I have a published artifact.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201054.png"><img width="508" height="305" class="alignnone wp-image-695" alt="snip_20170411201054" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201054-1024x615.png" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201103.png"><img width="672" height="320" class="alignnone wp-image-697" alt="snip_20170411201103" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411201103-1024x488.png" /></a>

Now I can create a release task - there is a built in task which will allow me to run something inside Azure - I can use that to add and compile my configuration. I've created a super basic script to do just that (I had to experiment to find out the directory where the configuration is located - there is probably a better way to do it but.....

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411210834.png"><img width="464" height="516" class="alignnone wp-image-715" alt="snip_20170411210834" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411210834-921x1024.png" /></a>

I created a basic script which uploads the configuration to my automation account and compile it. I can then call this script in the release task.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411210848.png"><img width="795" height="155" class="alignnone wp-image-716" alt="snip_20170411210848" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411210848-1024x200.png" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411211033.png"><img width="745" height="340" class="alignnone wp-image-726" alt="snip_20170411211033" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411211033-1024x467.png" /></a>

The cool thing about the Azure PowerShell script task is that it picked up my subscription details and did all the authorization for me.

Now all that is left to do is to run it.....

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411211530.png"><img width="571" height="297" class="alignnone wp-image-735" alt="snip_20170411211530" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411211530-1024x532.png" /></a>

Success!! And to verify I can check my automation account.

<a href="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411211711.png"><img width="643" height="292" class="alignnone wp-image-745" alt="snip_20170411211711" src="https://msdnshared.blob.core.windows.net/media/2017/04/snip_20170411211711-1024x465.png" /></a>

So there it is - my first compiled DSC configuration in Azure Automation DSC released via VSTS.

It's a long way from finished - there are some other parts which I will update once complete:-
<ol>
 	<li>Triggering the builds and releases from pull requests</li>
 	<li>Ensuring there are no syntax errors in the configuration</li>
 	<li>Using configuration data in the compilation - so I can use credentials in my configurations.</li>
 	<li>Handle multiple configuration files.</li>
</ol>
&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Change in focus...</title>
      <link>https://docs.microsoft.com/archive/blogs/automagically/change-in-focus</link>
      <pubDate>Wed, 22 Mar 2017 11:58:22 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Watherston]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/automagically/?p=615</guid>
      <description><![CDATA[I forgot I haven't touched this in a while - but will not be posting anything about Service Manager...]]></description>
      <content:encoded><![CDATA[I forgot I haven't touched this in a while - but will not be posting anything about Service Manager any more. I'm now changing focus to all Automation related technologies - specifically Azure Automation and PowerShell Desired State Configuration.]]></content:encoded>
    </item>
    <item>
      <title>Using DSC to Setup the New SCSM Portal Server</title>
      <link>https://docs.microsoft.com/archive/blogs/automagically/using-dsc-to-setup-the-new-scsm-portal-server</link>
      <pubDate>Mon, 15 Feb 2016 23:41:38 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Watherston]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/automagically/?p=581</guid>
      <description><![CDATA[Hooray the new portal is out – you can get it from...]]></description>
      <content:encoded><![CDATA[Hooray the new portal is out – you can get it from <a title="https://www.microsoft.com/en-us/download/details.aspx?id=49556" href="https://www.microsoft.com/en-us/download/details.aspx?id=49556">https://www.microsoft.com/en-us/download/details.aspx?id=49556</a>

The portal server requires some configuration of roles before the setup can be run. Below is a DSC configuration block which you can run to configure the web server pre-requisites.

<code>Configuration PortalWebServer
{

Node localhost
{

WindowsFeature WebServer
{
Ensure="Present"
Name="Web-Server"
}

WindowsFeature NETASP
{
Ensure="Present"
Name="NET-Framework-45-ASPNET"
DependsOn = "[WindowsFeature]WebServer"
}

WindowsFeature WebAuth
{
Ensure="Present"
Name="Web-Windows-Auth"
DependsOn = "[WindowsFeature]WebServer"
}
WindowsFeature BasicAuth
{
Ensure="Present"
Name="Web-Basic-Auth"
DependsOn = "[WindowsFeature]WebServer"
}
WindowsFeature ASP
{
Ensure="Present"
Name="Web-ASP"
DependsOn = "[WindowsFeature]WebServer"
}
WindowsFeature ASPNET
{
Ensure="Present"
Name="Web-ASP-Net"
DependsOn = "[WindowsFeature]WebServer"
}
WindowsFeature ASPNET45
{
Ensure="Present"
Name="Web-ASP-Net45"
DependsOn = "[WindowsFeature]WebServer"
}
WindowsFeature HTTPAct
{
Ensure="Present"
Name="AS-HTTP-Activation"
DependsOn = "[WindowsFeature]WebServer"
}
}
}

PortalWebServer
Start-DscConfiguration -Path .\PortalWebServer -Verbose -Wait</code>]]></content:encoded>
    </item>
    <item>
      <title>Domain Join Using Azure Automation DSC</title>
      <link>https://docs.microsoft.com/archive/blogs/automagically/domain-join-using-azure-automation-dsc</link>
      <pubDate>Mon, 15 Feb 2016 23:23:22 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Watherston]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/automagically/?p=573</guid>
      <description><![CDATA[Now we have the ability to store DSC configurations in the cloud as part of an Azure Automation...]]></description>
      <content:encoded><![CDATA[Now we have the ability to store DSC configurations in the cloud as part of an Azure Automation account. There are a few caveats to doing though – in this blog I will take you through joining a computer to a domain using Azure Automation DSC.

First things first I suggest you read <a title="https://azure.microsoft.com/en-us/documentation/articles/automation-dsc-overview/" href="https://azure.microsoft.com/en-us/documentation/articles/automation-dsc-overview/">https://azure.microsoft.com/en-us/documentation/articles/automation-dsc-overview/</a> and watch the video as it explains how the service works.

One of the items highlighted not in the actual blog but in the comments is that the configurations do not support PSCredential objects – as we have no way to secure them or use configuration data. So the resource needs to be modified to be able to accept string input else it will not work. Below are some of the steps I went through to get this to work.

As this feature is still in preview you need to run the below commands once you have connected to your Azure account to register for Azure Automation DSC

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_704CBD40.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_08DEEB42.png" alt="image" width="795" height="63" border="0" /></a>

The commands for AA DSC are all part of Azure Resource Manager – so generally we are using that mode to run PowerShell against the service. We also need to use the preview portal in Azure to manage the features.

Ensure you have an automation account registered in the preview portal. You can create a new account by using the new account button in the portal or the command below:

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_1F349087.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_3D15A539.png" alt="image" width="412" height="111" border="0" /></a>

Using Powershell below I do a couple of things. I create a new automation account and link it to my resource group (Line 3). Then I retrieve that account and store it in a variable (Line 5). Finally I run the Get-AzureAutomationRegistrationInfo cmdlet against my account and store the result in the $registrationinfo variable. I will use fields from this variable to register my node to AA DSC.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_77FCD802.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_630DE640.png" alt="image" width="810" height="98" border="0" /></a>

Copying directly from the link above we need to put settings for the Local Configuration Manager (LCM) into a JSON variable. We then pass this when the extension is installed. You can modify some of the variable to suit your needs if required.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_404CAE83.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_1D1F43D1.png" alt="image" width="817" height="245" border="0" /></a>

Now we have enough information to register a node in AA DSC. I put the VM I want to register into a variable using Get-AzureVM – then use the Set-AzureVMExtension to add the DSC extension. After this you must update the VM to apply the configuration.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_55CC7E8F.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_0C3D3092.png" alt="image" width="837" height="53" border="0" /></a>

You just have to wait for the extension installation to complete – but when you check your automation account in the portal it will show the node as registered under the DSC Nodes blade. If there are issues you can check on the VM in C:\WindowsAzure\Logs\Plugins\Microsoft.Powershell.DSC\2.0.0.0 – there are log files which details what is happening as the extension is installed.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_14C08FDC.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_596FBACE.png" alt="image" width="413" height="387" border="0" /></a>

Now for modifying the resource – I am doing a domain join so I will use the xComputerManagement DSC resource and modify it. The original schema looks like below – it contains a couple of Credential objects.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_36AE8311.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_7195B5DA.png" alt="image" width="739" height="209" border="0" /></a>

As credentials object are not yet supported in AA DSC I need to modify the resource to accept string. First I go through all the folders and rename the ‘x’ prefix to ‘c’ to indicate I am changing the module. This has to be done everywhere including the schema mof file.

I then altered some of the properties inside the schema file to accept different values i.e. string for a password. Here is my new schema. As this was a quick play around I have forgone the unjoin credential and just added a password field. I also added a username value. In my DSC functions I will create a credential object using a combination of the domainname \ username.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_433EC0DE.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_19CA7F9E.png" alt="image" width="499" height="268" border="0" /></a>

I also modified the module file for the resource. I changed the parameters for each of the functions to match the schema: -

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_4FCEFEAB.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_38A3842D.png" alt="image" width="500" height="244" border="0" /></a>

The original MOF file has a credential parameter – I added in some code to create a credential object using the value I supply in my $password parameter. This was added to each of the functions.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_7CE67C2A.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_53723AEA.png" alt="image" width="796" height="73" border="0" /></a>

One last thing – at this time AA DSC doesn't support module versions – I need to rename the folder version number to cComputerManagement. My overall structure for the resource looks like below.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_30B1032D.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_40BFD1E4.png" alt="image" width="344" height="134" border="0" /></a>

Once this has all been modified I can zip up the resource and load it into Azure Automation using the preview portal.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_57157729.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_7900D9AD.png" alt="image" width="528" height="251" border="0" /></a>

To ensure the module has loaded correctly I can use the Get-AzureAutomationModule cmdlet and check the status of my new module – it can take a few minutes before it is provisioned.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_3D43D1AB.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_455AFE00.png" alt="image" width="596" height="157" border="0" /></a>

Now that this is complete I can write the DSC configuration for my server – as yet AA DSC doesn’t support configuration data so I have to accept any parameters into my configuration script and process them within. The node name I use does not have to reflect a server name – however it will appear as the configuration I supply to my node.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_05277537.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_46C1B183.png" alt="image" width="460" height="342" border="0" /></a>

If your module is loaded correctly on your system you can use Ctrl-Space inside the resource to prompt you for the appropriate fields. I save my file and we are ready to compile it inside Azure. The Azure module contains cmdlets to process your configuration – these are done via compilation jobs. You supply the parameters for you configuration as a hash table to the compilation cmdlet.

The script below loads the configuration into Azure and then starts a compilation job with the parameters I supply.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_2AB38349.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_07F24B8C.png" alt="image" width="866" height="94" border="0" /></a>

The compilation job takes a few minutes to run – you can query the status by using the Get-AzureAutomationDSCCompilationJob cmdlet – if the jobs status returns as suspended you can supply the ID of the job to the above cmdlet and it will show you the errors genererated.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_39EC7CC7.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_04764B53.png" alt="image" width="706" height="238" border="0" /></a>

Once this is complete our configuration is ready to apply to the server using the cmdlets below. The cmdlet below will show me my configuration is available.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_318DC8D2.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_0A56104E.png" alt="image" width="715" height="197" border="0" /></a>

I can then apply it my server.

<a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_4E2CD556.png"><img title="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-64-metablogapi/image_5F00_thumb_5F00_5DCF7118.png" alt="image" width="823" height="62" border="0" /></a>

After the configuration has been applied and when the refresh frequency has been given time to apply the configuration your server will now be joined to domain. To force the configuration you can use the Update-DSCConfiguration cmdlet so it will contact the Azure DSC pull server.

&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>