Microsoft Operations Management Suite, DSC, and PowerShell

Summary: Learn how Microsoft Operations Management Suite (OMS), Desired State Configuration (DSC) and PowerShell work together to simplify management of hybrid systems.

Good morning everyone, Ed Wilson here. Well today, Teresa (aka the Scripting Wife) and I are on our way to Manchester where I am speaking at the Manchester PowerShell User Group.  and today I want to talk about OMS, DSC and Windows PowerShell.

It really should come as no surprise that OMS does DSC … really. I mean OMS does Windows PowerShell, in fact, it uses a lot of Windows PowerShell, and at it’s heard Desired State Configuration (DSC) is Windows PowerShell. I know, it can be a lot of letters OMS does DSC with Windows PowerShell. Anyway, DSC is the solution to the age old problem of “I have a bunch of servers that all need to have the same configuration. How can I do it?” Well, solutions have been around. I know of one customer, that I worked with, that used WMI and VBScript. The configuration settings were all stored in a database, and he read the database, then called the VBScripts to make the settings changes. It was a lot of work, but in the end, he something that kind of worked. This was something like what I had learned about at the University … the Configuration Management Database (cmdb) … which as far as I know, no one ever completed implemented a cmdb. Later with Windows PowerShell, a lot of people have done a similar sort of thing. In fact, in my Windows PowerShell Resource Guide book, I create a database to store configuration settings that we wish to have, and run various Windows PowerShell scripts that check the database, and then check various servers to see if the configuration settings are the same, and if they are not then we can run the Windows PowerShell code to change the settings so that they match. It was a lot of code, but not horribly difficult conceptually.

With DSC, we write Windows PowerShell code that creates a configuration (MOF) file. This file then  is used by the DSC service to inform the various providers of the settings that need to be set. The configuration is either pushed out to servers, or is pulled down by the servers. There is a service that runs on a specific schedule that checks the configuration, and if it has drifted from what is desired, then the server is changed so that it matches the configuration.

It is pretty cool, and is a great way to ensure that my desired configuration matches my actual configuration. If someone goes onto a server and makes a bunch of changes … then the next time the consistency checker runs, it will be changed back to my desired configuration state. Or, I can force the consistency checker to run and it will refresh my configuration on demand.

Now, the thing is, that DSC is built into the Windows Management Framework, and it is infrastructure. In this way, it is sort of like Windows Management Instrumentation (WMI). That is that it provides the plumbing, the services, the providers and the like to perform DSC … but DSC is not a management application. Most of the time, when it is demo’ed it is demo’ed by using Windows PowerShell … in this way, Windows PowerShell is the management application … in much the same way that when VBScript was running a WMI script, then VBScript was the management application. This was a lot of work. So, when SMS (Systems Management Server) came out, and it used lots of WMI … it really did not do anything I couldn’t do with VBScript, except that it was a complete solution … by the time I had written everything that SMS did in VBScript had done, it would have been obsolete.

So, while it is possible to do DSC with Windows PowerShell, it can be a lot of work. And, this is where OMS comes into the picture.

That is all I have for you today. Join me tomorrow when I’ll talk specifically about what OMS brings to the DSC table. Until then, if you are in Manchester today, stop by and say hi. We would love to meet you.

If you would like to get a free Microsoft Operations Management Suite (#MSOMS) subscription so that you can test out the new alerting features, you can do so from here. You can also get a free subscription for Microsoft Azure as well by selecting this link.

I invite you to follow me on Twitter and the Microsoft OMS Facebook site. If you want to learn more about Windows PowerShell, visit the Hey, Scripting Guy Blog. If you have any questions, send email to me at I wish you a wonderful day, and I’ll see you tomorrow.

Ed Wilson
Microsoft Operations Management Team

Comments (0)

Skip to main content