Get started with Windows PowerShell DSC

It’s easy to automate Windows Server configuration management with PowerShell; here’s how

Become An Insider

Sign up now and get FREE access to hundreds of Insider articles, guides, reviews, interviews, blogs, and other premium content. Learn more.

In today's cloud-centric world, we’re seeing an explosion in the number of servers under IT management. Virtual machines made servers cheap, and containers will push prices down further. As a result, businesses can afford to deploy a server for every new need, but they can no longer afford to manage servers individually. Your servers no longer garner individual attention but are simply soldiers in a huge resource pool, dutifully fulfilling the resource requests of the data center.

This dramatic increase in server population requires a new method of resource management, called configuration management. Products like Chef, Puppet, Ansible, Salt, and CFEngine have automated configuration management in the Linux world for many years now. It wasn't until recently that the companies behind these products started taking Windows seriously. This is in part due to Windows PowerShell Desired State Configuration (DSC). Introduced with PowerShell 4, DSC provides a way to manage Windows servers declaratively through the same configuration management practices the open source community has been using for years.

At first glance, you might think that DSC is a competitor to these trusted configuration management solutions. Technically, you can bring all of your servers under DSC management and forgo the other products. However, this is not Microsoft's intention, and in an environment of any size, you'd soon see the downfalls of such an attempt. Microsoft did not build DSC to be a competitor but to be used as a platform for others to build upon. DSC was built to provide a standardized method that any solution could use to manage Windows (and Linux) systems however they choose.

If you're looking into managing your Windows systems with a configuration management product, why would you choose to use DSC anyway? After all, it's a bare-bones platform. In fact, DSC is still extremely valuable for smaller businesses that don't require features, such as reporting and Web management, that larger enterprises might require. One of the big advantages DSC has for smaller businesses is that it's built right into the operating system as of Windows Server 2012 R2. There's no need to download, deploy, and manage third-party software. It comes baked into Windows already.

What DSC is made of

DSC is built to manage configuration baselines using three main components: resource providers (Windows Server features, processes, files, registry keys, and so on), resources (the building blocks of configuration scripts), and a Local Configuration Manager (LCM), the DSC “client” or “agent” that applies configuration scripts on each target node. These components work in tandem to deliver a configuration to a particular server.

To continue reading this article register now