
Azure DSC is a powerful tool for managing your virtual machines in Azure. It allows you to automate the configuration and management of your VMs, ensuring they are running smoothly and securely.
To get started with Azure DSC, you need to understand its core components: configuration, resources, and nodes. These components work together to define the desired state of your VMs.
Azure DSC uses a pull model, where nodes (your VMs) periodically check with a server (the DSC server) for updates on their configuration. This ensures that your VMs are always up-to-date and running as intended.
By using Azure DSC, you can automate tasks such as patching, configuration, and even deployment of your VMs. This saves you time and reduces errors, making your life easier as an Azure administrator.
Importing and Managing
Importing a configuration into Azure Automation is a straightforward process. You can import a configuration into the Automation account by selecting the Configurations tab, then selecting Add, and finally browsing to the configuration file on your computer.
To import the configuration, you'll need to select the configuration file that you saved in the prior step. After clicking OK, the configuration will be imported into the Automation account. You can verify this by checking the Configurations tab in the State configuration (DSC) page.
Here are the steps to import a configuration into Azure Automation:
- Sign in to the Azure portal.
- On the left, select All resources and then the name of your Automation account.
- On the Automation account page, select State configuration (DSC) under Configuration Management.
- On the State configuration (DSC) page, select the Configurations tab, then select Add.
- On the Import Configuration pane, browse to the configuration file on your computer.
- Select OK.
Import
To import a configuration into Azure Automation, you'll need to follow these steps. Sign in to the Azure portal and select All resources.
Once you're on the Automation account page, select State configuration (DSC) under Configuration Management. Then, select the Configurations tab and click + Add.
You can also import the configuration by selecting State configuration (DSC) in the left pane, clicking the Configurations tab, and then clicking + Add.
Broaden your view: The Azure State
Managed List
To view the list of managed nodes, you need to access the State configuration (DSC) page in the Azure portal.
Sign in to the Azure portal and select All resources on the left-hand side. Then, choose the name of your Automation account.

On the Automation account page, select Configuration Management and then State configuration (DSC) from the dropdown menu.
The Nodes tab on this page contains a list of all machines enabled for management in your Automation account.
You can access this list by following these steps:
- Sign in to the Azure portal.
- On the left, select All resources and then the name of your Automation account.
- On the Automation account page, select State configuration (DSC) under Configuration Management.
- On the State configuration (DSC) page, select the Nodes tab.
View
Viewing configurations and node status is a crucial part of Azure DSC management. You can view a configuration in the Azure portal by signing in and navigating to your Automation account's State configuration (DSC) page.
To view a configuration, follow these steps: Sign in to the Azure portal, select your Automation account, then State configuration (DSC) under Configuration Management, and finally select the Configurations tab to find the imported configuration.
You can also view node configurations, which are created after a compilation job is successful. These node configurations are MOF documents deployed to the pull server and can be found on the State configuration (DSC) page.
To view node configurations, sign in to the Azure portal, select your Automation account, then State configuration (DSC) under Configuration Management, and finally select the Compiled configurations tab.
Node status can also be viewed on the State configuration (DSC) page, where you can filter the display by status, node configuration, or name search.
Configuration and Settings
The settings for the Azure DSC extension are crucial for a successful deployment. You can specify the version of the Windows Management Framework (WMF) to be installed on your VM by setting the `settings.wmfVersion` property to '4.0', '5.0', or 'latest'.
The `settings.configuration.url` property specifies the URL location from which to download your DSC configuration zip file. You'll also need to set the `protectedSettings.configurationUrlSasToken` property to the value of your SAS token if the URL requires access.
You can pass parameters to your DSC configuration using the `settings.configurationArguments` property, which is not encrypted.
Settings
The Settings section is where you get to customize your PowerShell DSC Extension for Windows. The default value for the settings.wmfVersion property is 'latest', which will install the most updated version of WMF.
You can specify the version of WMF you want to install by setting the settings.wmfVersion property to '4.0' or '5.0'. The possible values for this property are subject to updates, so be sure to check the latest options.
The settings.configuration.url property specifies the URL location from which to download your DSC configuration zip file. If the URL requires a SAS token for access, you'll need to set the protectedSettings.configurationUrlSasToken property to the value of your SAS token.
The settings.configuration.script property specifies the file name of the script that contains the definition of your DSC configuration. This script must be in the root folder of the zip file downloaded from the URL specified by the configuration.url property.
Here's a summary of the settings properties:
The settings.privacy.dataEnabled property enables or disables telemetry collection. You can set this property to 'Enable', 'Disable', '' (empty string), or $null. Leaving this property blank or null will enable telemetry.
Terms

Terms are an essential part of configuration and settings, and understanding them can make a big difference in how you use your system.
The term "configurable" means that a setting can be changed or customized to suit your needs. In the article, we discussed how a specific setting can be adjusted to optimize performance.
"Parameter" is a term used to describe a specific value or setting that can be adjusted. For example, we mentioned how changing a parameter can affect the system's behavior.
A "preset" is a pre-configured setting that can be easily applied. We saw how presets can be used to quickly change settings without having to manually adjust each parameter.
"Default" refers to a setting that is applied automatically unless it is changed by the user. In our article, we discussed how default settings can be overridden with custom settings.
A different take: What Is Azure Used for
VM Management and Operations
Azure DSC allows you to manage Azure Resource Manager VMs, as well as on-premises VMs and Linux machines.
To enable an Azure Resource Manager VM for management, you need to sign in to the Azure portal and select your Automation account. From there, you can follow the steps to configure State Configuration.
The process involves adding the VM to the State configuration (DSC) page, selecting the node configuration to apply, and checking the Reboot Node if Needed box. The node configuration is then applied to the VM at intervals specified by the Configuration Mode Frequency and Refresh Frequency values.
To configure these values, you can refer to the Configuring the Local Configuration Manager documentation.
Enable VM Management
To enable VM management, you'll first need to sign in to the Azure portal. This is the starting point for managing your virtual machines. From the Azure portal, navigate to Automation accounts, where you can select an account and then access the State configuration (DSC) feature.
The State configuration (DSC) feature allows you to manage various types of machines, including Azure VMs, on-premises VMs, Linux machines, and more. To enable Azure Resource Manager VMs specifically, follow the steps outlined in the Azure portal.
To enable an Azure Resource Manager VM, you'll need to sign in to the Azure portal, navigate to your Automation account, and select State configuration (DSC) under Configuration Management. From there, select the Nodes tab and click + Add to add a new node. Choose your VM from the Virtual Machines pane and click + Connect to begin the registration process.
During the registration process, you'll need to select a node configuration to apply to your VM. You can choose from existing configurations or create a new one. Be sure to check the Reboot Node if Needed option to ensure the configuration is applied successfully.
The entire process typically takes a few minutes to complete, after which your VM will show up in the Nodes tab of the State configuration (DSC) page.
Unregister
Unregistering a node is a straightforward process that can be done if you no longer want State Configuration to manage it.

You can unregister a node by following the instructions in "How to remove a configuration and node from Automation State Configuration".
To unregister a node, you need to have access to the Automation State Configuration, which allows you to manage and maintain your nodes.
The process of unregistering a node is similar to removing a configuration, and you can find more information on how to do this in the mentioned article section.
Frequently Asked Questions
What is Azure Automation DSC?
Azure Automation DSC is a cloud-based configuration management service that helps you manage and deploy PowerShell configurations across any cloud or on-premises environment. It allows you to write, manage, and compile configurations for nodes in your datacenter.
What is Microsoft DSC?
Microsoft DSC is a feature in PowerShell that automates the configuration of Windows and Linux operating systems. It uses declarative scripting to ensure consistent and reliable system settings.
How much is Azure DSC?
Azure DSC costs $0.0083 per node per hour, with a maximum monthly cost of $6 per node. Learn more about pricing and calculate your costs for Azure DSC.
What is the desired state of configuration?
Desired State Configuration (DSC) aims to maintain a consistent system configuration across all devices and workstations. It ensures that all systems are in a standardized state, reducing configuration drift and improving overall system management.
How to setup desired state configuration?
To set up Desired State Configuration (DSC), install a module containing DSC resources and follow a series of steps to define, apply, and manage configurations on your machine. Start by defining a configuration and generating the configuration document to begin the setup process.
Sources
- https://learn.microsoft.com/en-us/azure/automation/automation-dsc-getting-started
- https://learn.microsoft.com/en-us/azure/automation/quickstarts/dsc-configuration
- https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/dsc-windows
- https://github.com/Huachao/azure-content/blob/master/articles/automation/automation-dsc-overview.md
- https://stackoverflow.com/questions/41399940/azure-choosing-between-dsc-extension-and-dsc-automation
Featured Images: pexels.com