Introduction to migrating from PowerShell DSC

Everything most DSC tutorials teach you assume that you're starting from a fresh clean machine, a new configuration document, and the latest resources. That's rarely the reality.

If you've been working with PowerShell DSC for years, you have an estate. Folders full of Configuration scripts. Compiled MOF files sitting on pull servers. A custom script resource written in 2016 that nobody dares to touch. Scheduled Local Configuration Manager (LCM) runs that keep production servers in shape while everyone's attention is elsewhere.

That estate doesn't disappear because a new engine shipped. And here's the good news: it doesn't have to. Microsoft built a migration story into DSC from the start. The PowerShell adapters run your existing modules. You can write your own import extension translating MOF files on the fly. Modern resource patterns show you what a rewrite looks like when you decide one is worth it.

What's missing is the connection between those pieces: a structured way to look at what you have, decide per resource and per configuration what to do with it, and execute that decision without breaking production. That's what this module gives you.

Figure 1: Illustration from old to new.

Scenario

You're the platform engineer at Bindery, a company that manufactures and ships books. Bindery's operations team has run PowerShell DSC since 2017. Their estate is modest by enterprise standards, and typical:

  • A module called BinderyOps with a script-based resource, AppEnvironment, that manages machine-level environment variables.
  • A Configuration script, LegacyWebServer.ps1, that combines AppEnvironment with the built-in File resource.
  • Compiled MOF files on a pull server, some of which no longer have a matching source script anywhere in source control.
  • LCM settings that run a consistency check every 15 minutes in ApplyAndAutoCorrect mode.

Leadership has asked for a migration plan. A plan, not a migration. They want to know what moves, what stays, what it costs, and what breaks. Your first job is to find out what you actually own.

Learning objectives

By the end of this module, you'll be able to:

  • Explain the reasons to migrate from PowerShell DSC, and the equally reasons to delay.
  • Classify the four artifact types in a PowerShell DSC estate and describe how each one migrates.
  • Build a migration inventory that shows which resources each Microsoft DSC adapter can already discover.
  • Assign every resource and configuration to one of four migration paths, with a defensible rationale.

Prerequisites

  • Practical experience authoring and compiling PowerShell DSC configurations
  • Familiarity with Microsoft DSC configuration documents and the dsc CLI
  • A Windows machine with Windows PowerShell 5.1, PowerShell 7+, and the dsc CLI installed

> EOF