Posts

Showing posts from February, 2021

Configuring Virtual Machines Using Desired State Configuration - Part 2 - Local Configuration Manager

Image
In the previous post of the series (available here ) we went through an introduction of Powershell DSC and how it can help with configuring virtual machines. This post is going to be about the Local Configuration Manager, also known as LCM, the engine that is the heart of DSC. When a configuration file is pushed to a node, the LCM is the component that is responsible for performing all the operations in order to bring the system to the desired state. Apart from that, LCM can also monitor the system for configuration drift and take actions in order to remedy it. LCM works with files in the C:\Windows\System32\Configuration directory and there are three of them in particular that you should be aware of: Current.mof . This is the file that contains the current configuration. Previous.mof . This file contains the previous configuration that was applied to the system. Usefull for reverting to a previous state. The following screenshot shows the above files: Pending.mof.  When a configurati

Configuring Virtual Machines Using Desired State Configuration - Part 1 - Introduction

Image
With the ever evolving world of cloud, organizations need to deploy and configure resources faster and in a more controlled manner. Although Azure ARM and other tools like Terraform provide the ability to manage all the resources as code and just submit deployment jobs, we sometimes need a bit more, especially when it comes to virtual machines. Microsoft Desired State Configuration is a technology that helps to approach the guest operating system of virtual machines is a similar manner. So, what is DSC exactly? As per Microsoft Docs,  DSC is a management platform in PowerShell that enables you to manage your IT and development infrastructure with configuration as code. But what does that mean to the everyday consultant or administrator? With DSC, you are able to describe the configuration to be applied to a virtual machine and then the engine will take any steps necessary in order for the machine to reach that state. DSC can also manage configuration drift and not only apply configurat