&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Articles from October 2017 on PowerShell.org - Welcome Automaters!</title><link>https://powershell.org/articles/2017/10/</link><description>Recent content in Articles from October 2017 on PowerShell.org - Welcome Automaters!</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://powershell.org/articles/2017/10/index.xml" rel="self" type="application/rss+xml"/><item><title>Putting it all out there</title><link>https://powershell.org/articles/2017-10-26-putting-it-all-out-there/</link><guid>https://powershell.org/articles/2017-10-26-putting-it-all-out-there/</guid><pubDate>Thu, 26 Oct 2017 11:11:31 +0000</pubDate><description>&lt;p&gt;Yesterday I pushed my first real project to a public repository on GitHub. It&amp;rsquo;s small right now though I hope to flesh it out over time, and it is very niche, but I hope it helps others who come across it. Regardless I&amp;rsquo;m proud of it. If you like, you can check it out &lt;a href="https://github.com/liampkemp/Enabler"&gt;here,&lt;/a&gt; I&amp;rsquo;d love your feedback, but that&amp;rsquo;s not the reason I&amp;rsquo;m writing this.&lt;br&gt;
I&amp;rsquo;m here to tell you &lt;em&gt;&lt;strong&gt;why&lt;/strong&gt;&lt;/em&gt; I did it.&lt;br&gt;
You see, I&amp;rsquo;m a private kind of person. I don&amp;rsquo;t often put myself out there for fear of embarrassing myself. I have always been worried that I might end up looking silly. That someone who knows more than I do, or knows something differently than I do would catch me out -  and if that happened, I couldn&amp;rsquo;t put the genie back in the bottle. Back in school, I wouldn&amp;rsquo;t put my hand up even if I knew the right answer, just in case. I was ensnared by Impostor Syndrome, it was crippling, and it had to change.&lt;br&gt;
So, what did I do? I started a &lt;a href="https://itcloudpro.net"&gt;blog&lt;/a&gt;, and in almost a year I&amp;rsquo;ve managed to get around 10-12 posts up. It isn&amp;rsquo;t much nor is it pretty, and sometimes I worry too much about the time in between posts, and rush to put something up which is not always perfect. But I&amp;rsquo;m happy to be doing it all the same. Mostly, I try to post about topics and problems that I haven&amp;rsquo;t been able to find complete information around elsewhere.&lt;br&gt;
I&amp;rsquo;ve started spending more time sharing and interacting on Twitter and LinkedIn, rather than just reading and clicking links. I&amp;rsquo;ve  even been followed and liked a few times. Lastly, I&amp;rsquo;ve been spending more time on these forums and elsewhere, helping out where I can.&lt;br&gt;
Overall, I feel better in myself, and have a greater level of confidence in my skills, knowledge, and what I can bring to the table. In the end, that is what led me to feeling good enough to publish my project. I can&amp;rsquo;t say that I&amp;rsquo;m completely over Impostor Syndrome and I don&amp;rsquo;t think I ever will be. I can say that I don&amp;rsquo;t feel it as often as I used to, and I can use it to drive myself to be better.&lt;br&gt;
When we are presented with a problem, we often go looking for answers from others. Flip that around and it means that if you have solved a problem, there is probably someone else looking for the answer and would really appreciate your experience. So why not put it out there?&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Yesterday I pushed my first real project to a public repository on GitHub. It&rsquo;s small right now though I hope to flesh it out over time, and it is very niche, but I hope it helps others who come across it. Regardless I&rsquo;m proud of it. If you like, you can check it out<a href="https://github.com/liampkemp/Enabler">here,</a> I&rsquo;d love your feedback, but that&rsquo;s not the reason I&rsquo;m writing this.<br>
I&rsquo;m here to tell you <em><strong>why</strong></em> I did it.<br>
You see, I&rsquo;m a private kind of person. I don&rsquo;t often put myself out there for fear of embarrassing myself. I have always been worried that I might end up looking silly. That someone who knows more than I do, or knows something differently than I do would catch me out -  and if that happened, I couldn&rsquo;t put the genie back in the bottle. Back in school, I wouldn&rsquo;t put my hand up even if I knew the right answer, just in case. I was ensnared by Impostor Syndrome, it was crippling, and it had to change.<br>
So, what did I do? I started a<a href="https://itcloudpro.net">blog</a>, and in almost a year I&rsquo;ve managed to get around 10-12 posts up. It isn&rsquo;t much nor is it pretty, and sometimes I worry too much about the time in between posts, and rush to put something up which is not always perfect. But I&rsquo;m happy to be doing it all the same. Mostly, I try to post about topics and problems that I haven&rsquo;t been able to find complete information around elsewhere.<br>
I&rsquo;ve started spending more time sharing and interacting on Twitter and LinkedIn, rather than just reading and clicking links. I&rsquo;ve  even been followed and liked a few times. Lastly, I&rsquo;ve been spending more time on these forums and elsewhere, helping out where I can.<br>
Overall, I feel better in myself, and have a greater level of confidence in my skills, knowledge, and what I can bring to the table. In the end, that is what led me to feeling good enough to publish my project. I can&rsquo;t say that I&rsquo;m completely over Impostor Syndrome and I don&rsquo;t think I ever will be. I can say that I don&rsquo;t feel it as often as I used to, and I can use it to drive myself to be better.<br>
When we are presented with a problem, we often go looking for answers from others. Flip that around and it means that if you have solved a problem, there is probably someone else looking for the answer and would really appreciate your experience. So why not put it out there?</p>
]]></content:encoded></item><item><title>PowerShell + DevOps Summit 2018 schedule</title><link>https://powershell.org/articles/2017-10-24-powershell-devops-summit-2018-schedule/</link><guid>https://powershell.org/articles/2017-10-24-powershell-devops-summit-2018-schedule/</guid><pubDate>Tue, 24 Oct 2017 20:15:26 +0000</pubDate><description>&lt;p&gt;The schedule for the 2018 Summit still needs a little bit of polishing to finish it but it&amp;rsquo;s taking shape. I&amp;rsquo;ve started releasing information on sched.com that we&amp;rsquo;re using for all our scheduling needs for the Summit. The one and only truth regarding the sessions and their times can be found at &lt;a href="https://powershelldevopsglobalsummit2018.sched.com/"&gt;https://powershelldevopsglobalsummit2018.sched.com/ &lt;/a&gt;&lt;br&gt;
I&amp;rsquo;ll be adding sessions over the next few days so keep checking.&lt;br&gt;
I&amp;rsquo;m really excited about the schedule for the 2018 Summit. We&amp;rsquo;ll have 4 rooms for sessions with many of your favourite speakers returning and many new speakers which is really good to see. The Community Lightning Demos return by popular acclaim and we&amp;rsquo;ll be running an Iron Scripter competition as well. The PowerShell Team will be presenting all day Monday and at other sessions through out the Summit.&lt;br&gt;
Registration opens 1 November and once you&amp;rsquo;re registered through eventbrite your information will be sync&amp;rsquo;d to sched.com so that you can access the schedule and use the scheduling app.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The schedule for the 2018 Summit still needs a little bit of polishing to finish it but it&rsquo;s taking shape. I&rsquo;ve started releasing information on sched.com that we&rsquo;re using for all our scheduling needs for the Summit. The one and only truth regarding the sessions and their times can be found at <a href="https://powershelldevopsglobalsummit2018.sched.com/">https://powershelldevopsglobalsummit2018.sched.com/ </a><br>
I&rsquo;ll be adding sessions over the next few days so keep checking.<br>
I&rsquo;m really excited about the schedule for the 2018 Summit. We&rsquo;ll have 4 rooms for sessions with many of your favourite speakers returning and many new speakers which is really good to see. The Community Lightning Demos return by popular acclaim and we&rsquo;ll be running an Iron Scripter competition as well. The PowerShell Team will be presenting all day Monday and at other sessions through out the Summit.<br>
Registration opens 1 November and once you&rsquo;re registered through eventbrite your information will be sync&rsquo;d to sched.com so that you can access the schedule and use the scheduling app.</p>
]]></content:encoded></item><item><title>Using Azure Desired State Configuration – Part IV</title><link>https://powershell.org/articles/2017-10-10-using-azure-desired-state-configuration-part-iv/</link><guid>https://powershell.org/articles/2017-10-10-using-azure-desired-state-configuration-part-iv/</guid><pubDate>Tue, 10 Oct 2017 14:00:07 +0000</pubDate><description>&lt;p&gt;So we&amp;rsquo;ve talked about Azure Automation DSC and the extensive reporting we can get from it.  With the pricing as it is, it would be hard to argue as to why you would want to use anything else.  But I&amp;rsquo;m a completionist, and there may be some edge cases that might come up where you wouldn&amp;rsquo;t be able to use the pull method for configurations.  So let&amp;rsquo;s talk about how you can use Azure DSC to push a configuration to a virtual machine.&lt;br&gt;
So let&amp;rsquo;s get started!&lt;br&gt;
&lt;strong&gt;Publish the Configuration&lt;/strong&gt;&lt;br&gt;
In order to push a configuration, we need to publish it to a blob store.  When you use Publish-AzureRmVmDscConfiguration, the command bundles all of the required modules along with the configuration into a .zip file. It does this by pulling the modules from your local machine that you&amp;rsquo;re running the command from, so you&amp;rsquo;ll need to make sure that you have the appropriate modules installed on your system.&lt;br&gt;
First, we&amp;rsquo;ll go ahead and grab a storage account where these binaries can be published.  In the storage account, we have a blob store for our configurations.  This blob store is a private store.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>So we&rsquo;ve talked about Azure Automation DSC and the extensive reporting we can get from it.  With the pricing as it is, it would be hard to argue as to why you would want to use anything else.  But I&rsquo;m a completionist, and there may be some edge cases that might come up where you wouldn&rsquo;t be able to use the pull method for configurations.  So let&rsquo;s talk about how you can use Azure DSC to push a configuration to a virtual machine.<br>
So let&rsquo;s get started!<br><strong>Publish the Configuration</strong><br>
In order to push a configuration, we need to publish it to a blob store.  When you use Publish-AzureRmVmDscConfiguration, the command bundles all of the required modules along with the configuration into a .zip file. It does this by pulling the modules from your local machine that you&rsquo;re running the command from, so you&rsquo;ll need to make sure that you have the appropriate modules installed on your system.<br>
First, we&rsquo;ll go ahead and grab a storage account where these binaries can be published.  In the storage account, we have a blob store for our configurations.  This blob store is a private store.</p><p><code>$AutoResGrp = Get-AzureRmResourceGroup -Name 'mms-eus' $StorAcct = Get-AzureRmStorageAccount -ResourceGroupName $AutoResGrp.ResourceGroupName -Name 'modulestor'</code>Now that we have our private store, we&rsquo;re going to publish our configuration using the Publish-AzureRmVMDscConfiguration command.</p><p><code>$DSCBlob = Publish-AzureRmVMDscConfiguration -ConfigurationPath C:\Scripts\Configs\cmdpconfig.ps1 -ResourceGroupName $StorAcct.ResourceGroupName -ContainerName 'dscpushconfig' -StorageAccountName $StorAcct.StorageAccountName -Force $Archive = $DSCBlob.Split('/') | Select-Object -Last 1</code>As previously mentioned, the command reads your configuration, and then grabs the necessary modules from your local machine and adds them to the package when it publishes the configuration.  This way, the machine has all of the necessary bits to perform the configuration.  You can actually validate this by downloading the packaged .zip file from the blob store and seeing for yourself.<br>
Along with the modules and configuration, you&rsquo;ll also find a dscmetadata.json file that is essentially a manifest of the required modules.<br><img src="https://powershell.org/wp-content/uploads/2017/10/PushPackage-300x136.jpg" alt=""><br><strong>Install the VM Extension</strong><br>
Now that our binaries have been published, we can get our target machine and deploy the Azure DSC VM extension to it while assigning the configuration.  When you deploy the extension, it&rsquo;s best to use the latest version available.  If you want to check which version is the latest, you can check out the release history on the<a href="https://blogs.msdn.microsoft.com/powershell/2014/11/20/release-history-for-the-azure-dsc-extension/">PowerShell Team Blog</a>.</p><p><code>$ArmVmRsg = Get-AzureRmResourceGroup -Name 'nrdtste' $ArmVm = Get-Azurermvm -ResourceGroupName $ArmVmRsg.ResourceGroupName -Name 'ctrxeusdbnp01' Set-AzureRmVMDscExtension -ArchiveResourceGroupName $StorAcct.ResourceGroupName -ArchiveBlobName $Archive -ResourceGroupName $ArmVm.ResourceGroupName -ArchiveStorageAccountName $StorAcct.StorageAccountName -ArchiveContainerName 'dscpushconfig' -Version '2.26' -VMName $ArmVm.Name -ConfigurationName 'CMDPConfig' -Verbose</code>Like with Azure Automation DSC, when you register the VM extension, your PowerShell session will be held open until the extension returns a success or failure status.  Once it returns, you can check the status of the configuration using Get-AzureRmVmDscExtensionStatus.</p><p><code>PS C:\Users\willa&gt; Get-AzureRmVMDscExtensionStatus -ResourceGroupName $ArmVm.ResourceGroupName -VMName $ArmVm.Name ResourceGroupName : nrdtst3 VmName : ctrxeusdbnp01 Version : 2.26 Status : Provisioning succeeded StatusCode : ProvisioningState/succeeded Timestamp : 10/9/2017 1:12:22 PM StatusMessage : DSC configuration was applied successfully. DscConfigurationLog : {[2017-10-09 13:11:18Z] [VERBOSE] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] The operation 'Get-WindowsFeature' succeeded: Server-Gui-Shell, [2017-10-09 13:11:18Z] [VERBOSE] [ctrxeusdbnp01]: LCM: [ End Test ] [[WindowsFeature]RemoveUI] in 9.5980 seconds., [2017-10-09 13:11:18Z] [VERBOSE] [ctrxeusdbnp01]: LCM: [ Start Set ] [[WindowsFeature]RemoveUI], [2017-10-09 13:11:19Z] [VERBOSE] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] Uninstallation started......}</code>If you want to dive a little deeper, we can of course grab the specific DscConfigurationLog information:</p><p><code>PS C:\Users\willa&gt; (Get-AzureRmVMDscExtensionStatus -ResourceGroupName $ArmVm.ResourceGroupName -VMName $Armvm.Name).DscConfigurationLog [2017-10-09 13:11:18Z] [VERBOSE] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] The operation 'Get-WindowsFeature' succeeded: Server-Gui-Shell [2017-10-09 13:11:18Z] [VERBOSE] [ctrxeusdbnp01]: LCM: [ End Test ] [[WindowsFeature]RemoveUI] in 9.5980 seconds. [2017-10-09 13:11:18Z] [VERBOSE] [ctrxeusdbnp01]: LCM: [ Start Set ] [[WindowsFeature]RemoveUI] [2017-10-09 13:11:19Z] [VERBOSE] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] Uninstallation started... [2017-10-09 13:11:19Z] [VERBOSE] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] Continue with removal? [2017-10-09 13:11:19Z] [VERBOSE] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] Prerequisite processing started... [2017-10-09 13:11:24Z] [VERBOSE] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] Prerequisite processing succeeded. [2017-10-09 13:12:21Z] [WARNING] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] You must restart this server to finish the removal process. [2017-10-09 13:12:21Z] Settings handler status to 'transitioning' (C:\Packages\Plugins\Microsoft.Powershell.DSC\2.26.1.0\Status\0.status) [2017-10-09 13:12:21Z] [VERBOSE] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] Uninstallation succeeded. [2017-10-09 13:12:21Z] [VERBOSE] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] Successfully uninstalled the feature Server-Gui-Shell. [2017-10-09 13:12:21Z] [VERBOSE] [ctrxeusdbnp01]: [[WindowsFeature]RemoveUI] The Target machine needs to be restarted. [2017-10-09 13:12:21Z] [VERBOSE] [ctrxeusdbnp01]: LCM: [ End Set ] [[WindowsFeature]RemoveUI] in 62.7090 seconds. [2017-10-09 13:12:21Z] [VERBOSE] [ctrxeusdbnp01]: LCM: [ End Resource ] [[WindowsFeature]RemoveUI] [2017-10-09 13:12:21Z] [VERBOSE] [ctrxeusdbnp01]: [] A reboot is required to progress further. Please reboot the system. [2017-10-09 13:12:21Z] [WARNING] [ctrxeusdbnp01]: [] A reboot is required to progress further. Please reboot the system. [2017-10-09 13:12:21Z] [VERBOSE] [ctrxeusdbnp01]: LCM: [ End Set ] [2017-10-09 13:12:21Z] [VERBOSE] [ctrxeusdbnp01]: LCM: [ End Set ] in 74.8080 seconds. [2017-10-09 13:12:21Z] [VERBOSE] Operation 'Invoke CimMethod' complete. [2017-10-09 13:12:21Z] [VERBOSE] Time taken for configuration job to complete is 75.071 seconds</code>As you can see, the configuration is complete pending a reboot.  This brings us to a few of the caveats associated with the push method for Azure DSC.</p><ul><li>Unfortunately, unlike with the Register-AzurRmAutomationDscNodeConfiguration command available for Azure Automation, you cannot currently configure the LCM direct from the command.  Instead, you&rsquo;ll want to add a LocalConfigurationManager block to your top level config to set any attributes for the LCM.</li><li>As the system is downloading the packaged modules and configuration files, the mof file is configured locally on the machine.  While the current.mof file is encrypted, there is a copy of the mof that is generated in the C:\Packages\Plugins\Microsoft.Powershell.DSC<br>
\ directory.  You&rsquo;ll want to be careful as to what you&rsquo;re passing in plain text in that regard.</li><li>You can retrieve the DscConfigurationLog data for validation of your configs and the state of the machines, but this process requires automation and can take some time to compile.</li></ul><p>So now we&rsquo;ve explore Azure Desired State Configuration using the available push and pull methods.  And we&rsquo;ve explored the rich reporting capabilities that are available to you in Azure Automation DSC.  It&rsquo;s been a long journey, but I hope you&rsquo;ve found this content to be useful to you!<br>
Until next time!</p>
]]></content:encoded></item><item><title>Using Azure Desired State Configuration – Part III</title><link>https://powershell.org/articles/2017-10-03-using-azure-desired-state-configuration-part-iii/</link><guid>https://powershell.org/articles/2017-10-03-using-azure-desired-state-configuration-part-iii/</guid><pubDate>Tue, 03 Oct 2017 14:00:59 +0000</pubDate><description>&lt;p&gt;Last week we talked about modifying and uploading our configurations to Azure Automation DSC.  We were able to import credentials from Azure&amp;rsquo;s Automation Account Credential store, and then compile the .mof files in the automation account for deployment.  This week, we&amp;rsquo;ll be looking at how we apply those configurations to existing systems via PowerShell.  Then we&amp;rsquo;ll take a look at some of the reporting available via Azure Automation DSC and send those reports over to Operations Management Suite for dashboarding.&lt;br&gt;
So when we left off.  We successfully published our configurations in Automation DSC.  If we run Get-AzureRmAutomationDscNodeConfiguration against the configuration I published, we get the following:&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Last week we talked about modifying and uploading our configurations to Azure Automation DSC.  We were able to import credentials from Azure&rsquo;s Automation Account Credential store, and then compile the .mof files in the automation account for deployment.  This week, we&rsquo;ll be looking at how we apply those configurations to existing systems via PowerShell.  Then we&rsquo;ll take a look at some of the reporting available via Azure Automation DSC and send those reports over to Operations Management Suite for dashboarding.<br>
So when we left off.  We successfully published our configurations in Automation DSC.  If we run Get-AzureRmAutomationDscNodeConfiguration against the configuration I published, we get the following:</p><p><code>Get-AzureRmAutomationDscNodeConfiguration -ResourceGroupName $AutoAcct.ResourceGroupName -AutomationAccountName $AutoAcct.AutomationAccountName -ConfigurationName TestConfig</code><img src="https://powershell.org/wp-content/uploads/2017/09/aadscmofs-300x198.jpg" alt=""><br>
As you can see, when we published the configuration, it generated two configuration .mofs based on our node names - domainController and webServer.  Now of course, we&rsquo;re not going to be calling our servers webServer and domainController, rather, these are generalized names for our configurations.  We get the root configuration (TestConfig), and then the node specific configuration based on the root document (webServer or domainController).  This gives us a lot of flexibility as we can now statefully name our configurations, and assign them to machines without dealing with guids or having all of the mofs defined by a computer name or any other nonsense!  We just assign what named configuration goes to what system, and away we go.<br>
We don&rsquo;t even really care what the computer name is, as long as the correct config gets assigned.  This is really helpful when working on Azure Resource Manager templates, because I don&rsquo;t even really know what the system name will be until runtime.  I just designate a set of systems as &lsquo;webServer&rsquo;, assign the config and deploy.<br><a href="https://twitter.com/jsnover/status/553249369852358657"><em>Moo.</em></a><br><strong>Register the Virtual Machine</strong><br>
So let&rsquo;s go ahead and get a system that we want to target.  I just so happen to have one in Azure right here:</p><p><code>$TargetResGroup = 'nrdtste' $VMName = 'ctrxeusdbnp01' $VM = Get-AzureRmVM -ResourceGroupName $TargetResGroup -Name $VMName</code>Now that we have our VM object, we&rsquo;re going to create a hash-table with some configuration items for the DSC Local Configuration Manager on the target system.</p><p><code>$DSCLCMConfig = @{ 'ConfigurationMode' = 'ApplyAndAutocorrect' 'RebootNodeIfNeeded' = $true 'ActionAfterReboot' = 'ContinueConfiguration' }</code>Once we have all of this, we can now go ahead and register our target node in Automation DSC using the Register-AzureRmAutomationDscNode command.</p><p><code>Register-AzureRmAutomationDscNode -AzureVMName $VM.Name -AzureVMResourceGroup $VM.ResourceGroupName -AzureVMLocation $VM.Location -AutomationAccountName $AutoAcct.AutomationAccountName -ResourceGroupName $AutoAcct.ResourceGroupName @DSCLCMConfig</code>You might note with this command that you can also assign it a configuration as you register the node.  However, I&rsquo;ve had occasional issues with this method.  So we&rsquo;re going to go ahead and register the node first, then assign the configuration.  As another note, while the system is being registered, the command will hold your session until it returns a success or failure.  So grab another cup of coffee and enjoy it for a few minutes while we wait.<br><img src="https://powershell.org/wp-content/uploads/2017/09/VMregistered-300x123.jpg" alt=""><br><strong>Apply a Configuration</strong><br>
Now we can see our machine has registered successfully.  But if we run the Get-AzureRmAutomationDscNode command, we can see that the NodeConfigurationName property is empty.  So let&rsquo;s fix that.<br><img src="https://powershell.org/wp-content/uploads/2017/09/ConfigEmpty-300x76.jpg" alt=""><br>
What we need to do is capture the configuration we want to apply, so we do this by grabbing it with Get-AzureRmAutomationDscNodeConfiguration.  Then, we&rsquo;ll capture the target DSC endpoint with the Get command we previously used, and cast both objects to our Set-AzureRmAutomationDscNode command to apply the configuration to the appropriate node.</p><p><code>$Configuration = Get-AzureRmAutomationDscNodeConfiguration -AutomationAccountName $AutoAcct.AutomationAccountName -ResourceGroupName $AutoAcct.ResourceGroupName -Name 'CompositeConfig.webServer' $TargetNode = Get-AzureRmAutomationDscNode -Name $VM.Name -ResourceGroupName $AutoAcct.ResourceGroupName -AutomationAccountName $AutoAcct.AutomationAccountName Set-AzureRmAutomationDscNode -Id $TargetNode.Id -NodeConfigurationName $Configuration.Name -AutomationAccountName $AutoAcct.AutomationAccountName -ResourceGroupName $AutoAcct.ResourceGroupName -Verbose -Force</code>After a couple of seconds, we can see that the configuration has been assigned to our node.  Once the LCM hits it&rsquo;s next review cycle, it&rsquo;ll pick up the configuration and start applying:<br><img src="https://powershell.org/wp-content/uploads/2017/09/NodeConfigd-300x96.jpg" alt=""><br>
We can check on the status of our target node by using the Get-AzureRmAutomationDscNodeReport command like so to get some useful information:</p><p><code>Get-AzureRmAutomationDscNodeReport -NodeId $TargetNode.Id -ResourceGroupName $AutoAcct.ResourceGroupName -AutomationAccountName $AutoAcct.AutomationAccountName -Latest</code>And it will output some pretty useful information.<br><img src="https://powershell.org/wp-content/uploads/2017/09/PSReport-300x139.jpg" alt=""><br><strong>Azure Automation DSC Reports</strong><br>
This is where I have to admit that the UI really shines.  You can see all of your systems at a glance, with what configuration is assigned and it&rsquo;s current state.<br><img src="https://powershell.org/wp-content/uploads/2017/09/Report1-300x91.jpg" alt=""><br>
Furthermore, you can actually drill down through the nodes to see what resources are being applied, what their dependencies are, and what the state of the particular configuration item is.<br><img src="https://powershell.org/wp-content/uploads/2017/09/Report2-300x282.jpg" alt=""><br>
There is a wealth of data that you can find here in an easy to read dashboard.  Furthermore, you can connect this to a Log Analytics instance (or other products that support restful API), and ship it up for alerting and more dashboarding.<br><strong>Connecting to Log Analytics</strong><br>
So connecting your Azure Automation DSC is pretty straightforward.  To be able to use it, you need to have an OMS tier that includes the Automation and Control offering to start.  If you do, then all you have to do is follow a couple of simple commands.<br>
First, we have to get the resourceIds for the Automation Account and the Log Analytics workspace.</p><p><code>#Get the resourceId of the automation account. $AutoAcctResource = Find-AzureRmResource -ResourceType "Microsoft.Automation/automationAccounts" -ResourceNameContains 'testautoaccteastus2' #Get the resourceId of the Log Analytics Workspace $LogAnalyticsResource = Find-AzureRmResource -ResourceType "Microsoft.OperationalInsights/workspaces" -ResourceNameContains 'LWINerd'</code>Then we can use those resourceIds to pass to Set-AzureRmDiagnosticSetting and specify our DSCNodeStatus category.</p><p><code>Set-AzureRmDiagnosticSetting -ResourceId $AutoAcctResource.ResourceId -WorkspaceId $LogAnalyticsResource.ResourceId -Enabled $true -Categories "DscNodeStatus" -Verbose</code>Then you&rsquo;ll get a return similar to this:</p><p><code>PS C:\Scripts\Presentations\AzureAutomationDSC\ResourcesToUpload&gt; Set-AzureRmDiagnosticSetting -ResourceId $AutoAcctResource.ResourceId -WorkspaceId $LogAnalyticsResource.ResourceId -Enabled $true -Categories "D scNodeStatus" -Verbose StorageAccountId : ServiceBusRuleId : EventHubAuthorizationRuleId : Metrics TimeGrain : PT1M Enabled : False RetentionPolicy Enabled : False Days : 0 Logs Category : JobLogs Enabled : False RetentionPolicy Enabled : False Days : 0 Category : JobStreams Enabled : False RetentionPolicy Enabled : False Days : 0 Category : DscNodeStatus Enabled : True RetentionPolicy Enabled : False Days : 0 WorkspaceId : /subscriptions/f2007bbf-f802-4a47-9336-cf7c6b89b378/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/LWINerd Id : /subscriptions/f2007bbf-f802-4a47-9336-cf7c6b89b378/resourcegroups/mms-eus/providers/microsoft.automation/automationaccounts/testautoaccteastus2/providers/microsoft.insights/diagnosticSettings/service Name : service Type : Location : Tags :</code>After a little while, we can check back to our log search and start performing queries and configuring alerts.<br><img src="https://powershell.org/wp-content/uploads/2017/09/DSCReporting-300x154.jpg" alt=""><br>
So that&rsquo;s Azure Automation DSC in a nutshell!  But don&rsquo;t worry, I haven&rsquo;t forgotten about Azure DSC&rsquo;s push method.  We&rsquo;ll be talking about that next blog!</p>
]]></content:encoded></item></channel></rss>