No agent, no pull server, no problem? The pieces that make Microsoft DSC enterprise-ready

Not yet, but the missing pieces now have issue numbers and pull requests

No agent, no pull server, no problem? The pieces that make Microsoft DSC enterprise-ready

In August 2024 I left a comment on a proposal in the Microsoft DSC repository and called it a "brain dump". The proposal was a year old by then. It described a place to publish and fetch configurations and resources, which PowerShell DSC had from the start and Microsoft DSC still doesn't.

The question behind that proposal keeps coming back in the issue tracker: where did the LCM go? One contributor answered it by starting OpenDSC, which began as a thought experiment "of bringing back the LCM and pull server".

Better yet, the question doesn't stay on GitHub. Speaking to people at PSConfEU earlier this year, I got asked the same thing in person. These were people who run PowerShell DSC today and want to know what replaces the part that did the work for them.

So the title of this post is a real question, and today the answer is no. No agent and no pull server is a problem once you have more than one machine to manage. Since that comment, I've written two RFCs and four pull requests that each go after a part of the gap. All of them are drafts. This post is a status report from inside them: what each piece does, how far along it is, and what you can do in the meantime.

If you need to enforce configuration across a fleet this quarter, I'll save you the read: OpenDSC is available today and gives you an LCM and a pull server on top of Microsoft DSC. It's a community project, not a Microsoft product, and I come back to it near the end. The rest of this post is for deciding whether Microsoft DSC itself is worth planning around.

What the LCM did, in one paragraph

You ran one, so I'll keep it short. The Local Configuration Manager took configurations by push or pulled them from a server. The same server handed out the modules a configuration needed, and a report server collected status. By default the LCM checked the machine every 15 minutes, and depending on the mode it reported drift or corrected it. It could reboot the node when a resource asked for it.

All of that lived in one component. That made it convenient, and it also tied you to Windows, MOF, and a pull server that somebody had to keep running. The hosted alternative is ending too: Azure Automation State Configuration retires on September 30, 2027.

Microsoft moved that hosted role to Azure Machine Configuration, and it manages Linux as well as Windows. But it isn't the old LCM in a new place. It brings its own agent, which runs your configurations in PowerShell 7 with PSDesiredStateConfiguration v2, or a 3.0 prerelease on Linux. A configuration still compiles to MOF, and it ships with its modules as one package that the machine downloads over HTTPS. There is no pull server and no LCM meta-configuration, and whether a configuration only audits or also corrects is set in the package. It works for Azure virtual machines and Arc-enabled servers, so it needs Azure, and underneath it's still PowerShell DSC.

What Microsoft DSC chose instead

Microsoft DSC is one command. You give it a document in JSON or YAML, it calls resources written in any language, it returns JSON, and it exits. It runs on Windows, Linux and macOS. There is no service, no schedule and nothing listening.

One participant in the signing discussion said it in a sentence: "dsc.exe does not run as a service, something has to invoke it."

That something is meant to be a higher-level tool. WinGet Configuration is one: its v3 files are processed by Microsoft DSC. A CI pipeline or a scheduled task is another. But until now, "bring your own orchestration" has also meant bringing your own way to get a document onto a machine, your own way to get resources there, and your own way to know you can trust either.

That is the part that's changing. Here are the LCM's jobs, and what is lined up for each.

The LCM's job In Microsoft DSC Where it stands
Deliver a configuration to a machine DSC over SSH Draft pull request, experimental
Fetch configurations and resources An OCI registry Proposal, no code yet
Validate what was fetched Signing Open issue, design debated
Add your own checks and tooling Command plug-ins Draft pull requests
Enforce on a schedule and report Outside DSC, on purpose: OpenDSC or your own Available today, from the community

None of the first four is in the stable release, which is 3.3, or in the 3.4 previews.

For when to expect them, look at the milestone on each issue. The milestones are named after a release and say how firm the plan is, like 3.4-Approved or 3.5-Consider. As I write this, SSH, the registry and signing are on 3.4-Approved, and plug-ins are on 3.5-Consider. The milestones have no due dates, so read them as intent.

Deliver with SSH

The LCM's push mode needed WinRM. Microsoft DSC is cross-platform, so its equivalent has to use something every platform has.

Issue #1495 asks for dsc as an SSH subsystem, the mechanism SFTP uses. I wrote the RFC and an experimental implementation. DSC already has a server mode that talks over standard input and output, so sshd can start it. On your side, it's one option:

dsc --target ssh://admin@web01 config test --file baseline.dsc.yaml

The document is read on your machine, sent over the connection and run on the target. The result comes back as it would from a local run, with the same output and the same exit code. Nothing is copied to the target, which only needs dsc and the subsystem entry. Registering that entry is itself a DSC configuration.

For a security review, the useful part is what the feature leaves alone. It starts the ssh client that's already on your system, so keys, jump hosts and ~/.ssh/config behave as they already do, and DSC never handles a credential.

The limits today are one target per run, and only config get, set, test and export.

Fetch from a registry instead of a pull server

The pull server handed out configurations and modules. In Microsoft DSC a resource can be a Rust binary, a Python script or a PowerShell module, so "install the module" no longer covers it.

In 2023, Mikey Lombardi proposed an answer in issue #92: publish resource manifests and configuration documents as artifacts to an OCI registry, using ORAS. That's the kind of registry your container images already live in.

PowerShell has already made this move, which is why I don't think it's a leap. PSResourceGet can publish modules to an Azure Container Registry and install them from it. This works today:

Register-PSResourceRepository -Name Contoso -Uri 'https://contoso.azurecr.io'
Publish-PSResource -Path ./MyDscModule -Repository Contoso
Install-PSResource -Name MyDscModule -Repository Contoso

Microsoft's own registry is a default repository next to the PowerShell Gallery from PSResourceGet 1.3.0-preview1. So a PowerShell-based DSC resource can already live in the kind of registry the proposal describes.

The same documentation lists a limitation that makes the case for the proposal. Against a container registry, Find-PSResource -DscResourceName isn't supported. The module is there, but you can't ask the registry which DSC resources it holds. A registry that stores resource manifests answers exactly that: you find a resource and read its contract first, and pull the implementation second.

What I like for larger organizations is that there's no new server in this design. You already run a registry, with access control and mirroring. In a recent reply, Mikey wrote that keeping your own registry, one that pulls from upstream and adds your internal resources, should be the preferred setup.

My comment from 2024 builds on that, and I still stand by it. If documents live in a registry, Microsoft.DSC/Include could point at a versioned artifact, the way Azure Verified Modules are referenced. A security baseline becomes something you reference by name and version, instead of a file that gets copied from repository to repository.

Status: the issue carries the 3.4-Approved milestone. That is not a release date, and there is no dsc registry command to run.

Validate with signing

The pull server paired every configuration with a checksum file so the LCM could validate what it downloaded. A checksum tells you the file arrived intact. It doesn't tell you who published it, and a registry that many teams pull from needs that second answer.

Issue #210 asks for a way to run only signed, trusted configurations. In that thread, Mikey pointed out that tools like cosign can sign artifacts in an OCI registry, which would let one mechanism cover manifests and documents on every platform.

The thread hasn't settled who does the checking. One position is that DSC runs the resources, so DSC should verify them. The other is that DSC is a low-level tool, and whoever invokes it should verify what it hands over. Today there's a draft that warns on Windows when files aren't Authenticode-signed, and a request in the thread for an RFC that covers all platforms.

I think the registry changes this debate. If artifacts are signed when they're published, the natural place to verify is wherever they're pulled, and that can be dsc or the tool calling it. So I'd design signing together with the registry, and for all three platforms at once, even if that takes a release longer than a Windows-only check.

Extend with plug-ins

This row has no LCM counterpart. The LCM was closed: checks and tooling of your own lived in scripts around it. Microsoft DSC can do better, because tools like git have long shown how. Put an executable in the right place and it becomes a subcommand.

Issue #461 asks for that in DSC. I wrote the RFC and the implementation. An executable plus a small manifest, in a directory DSC already searches, becomes dsc <command>.

Two plug-ins exist as drafts. dsc lint checks a configuration document before it goes near a machine. dsc graph is a sample for the authoring guide that draws the dependencies in a document:

dsc graph --file app.dsc.yaml
flowchart TD
    n0["os<br/>Microsoft/OSInfo"]
    n1["Echo<br/>Microsoft.DSC.Debug/Echo"]
    n0 --> n1

Two rules are there for cautious organizations. Built-in commands always win, so a plug-in can't quietly replace dsc config. And one setting turns plug-ins off entirely, including from a policy file.

A third rule came out of review. My draft let the first plug-in found win when two claimed the same command, and mentioned it in an info message that few people would ever see. Steve Lee asked what should happen in that case and suggested a warning, plus a way to name a plug-in exactly. Both are in the RFC now: dsc lint runs the first one found and warns, and dsc OpenDSC/Lint runs that specific one. That exchange took a day, and it's the best argument I have for designing this in the open.

Enforce and report with OpenDSC or your own

Nothing above runs on a timer. There is no consistency check in dsc, no drift report and no reboot coordination, and I don't expect that to change. This job is left to whatever sits on top, and there are two ways to fill it today.

OpenDSC

OpenDSC is the closest thing to the old model, and you can install it now. According to its documentation, it provides:

  • An LCM service that monitors a machine and corrects drift, on Windows, Linux and macOS.
  • A pull server with configuration versioning, node targeting and compliance tracking.
  • A reporting dashboard.

It is open source under the MIT license, and its latest release is 0.5.1.

There is one thing to weigh before you build on it. OpenDSC is not backed by Microsoft. For many organizations, vendor backing is the first thing they look for in something that runs on every server, and a community project before its 1.0 release doesn't come with a support contract. If that's a requirement for you, the Microsoft-backed option is Azure Machine Configuration, with the differences from the LCM I described earlier.

[!TIP]
I describe how to run OpenDSC on Azure in The Microsoft DSC Handbook. If you're moving an existing PowerShell DSC estate, my course Migrating from PowerShell DSC to Microsoft DSC covers the migration.

Your own

If an agent and a server are more than you need, you can have a basic consistency check on the stable release with what's already there. Schedule this with whatever you schedule things with:

$result = dsc config test --file baseline.dsc.yaml | ConvertFrom-Json
$result.results | Where-Object { -not $_.result.inDesiredState } | Select-Object name, type

Every resource in the result has an inDesiredState value. Send the output to wherever your logs go and you have drift reporting. Replace test with set and you have correction.

Any orchestrator that can run a command and read JSON can drive dsc the same way.

The pieces in this post don't replace OpenDSC or a tool of your own. They reduce what such a layer has to bring: if dsc can reach a machine, fetch from a registry you already run and verify what it fetched, the layer on top can be thin.

So, no problem?

Not yet. Here is how I'd decide today.

  • You need fleet enforcement and reporting now: look at OpenDSC, and weigh that it's a community project without Microsoft behind it. The other four pieces aren't in a release.
  • You're deciding whether Microsoft DSC is a dead end for fleets: I don't think it is. Each of the LCM's jobs has an open design, for two of them there is code you can build and try, and the milestone on each issue tells you which release it's aimed at.
  • You want to influence it: this is the moment. Read #1495, #92, #210 and #461, and say what your environment needs.

The LCM isn't coming back into dsc itself. What's taking shape there is a set of parts built on things you already operate: SSH, a container registry, and commands you write yourself.

My part in this started as a comment under someone else's proposal. If one of these pieces is the one your environment is missing, the issue is open, and a comment is enough to start.