PowerShell Desired State Configuration Error: Undefined Property ConfigurationName

The scenario in this blog article is that you’ve created a DSC configuration on a computer that’s running a preview of PowerShell version 5. The machine itself could be running Windows 8.1, Server 2012 R2, or the Windows Technical Preview version of Windows 10.

Here’s a simple configuration that I’ll use to demonstrate the problem. This DSC configuration uses a custom DSC resource to rename a computer. This configuration is being created on a machine running the Windows Technical Preview version of Windows 10 with PowerShell version 5 build 9860 (the most recent build as of this writing).

A new Windows 2012 R2 Server (running PowerShell v4) has been brought online and no configuration has been done to it so far. The IP address of that server is That IP address has been added to the TrustedHosts on the Windows 10 workstation that is being used to create the DSC configuration.

The configuration is run and the MOF file is generated for the server as shown in the following example:


An attempt to apply the configuration to the server is made, but an error is generated:


Undefined property ConfigurationName
At line:16, char:2
+ CategoryInfo : SyntaxError: (root/Microsoft/…gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MiClientApiError_Failed
+ PSComputerName :

Since I’m using a custom DSC resource that I wrote, you might think that the error has to do with it, but this error would occur even if one of the Microsoft supplied DSC resources was being used.

The issue is that there’s a couple of extra lines in the MOF files generated by a machine running PowerShell version 5 which seems to make the MOF files incompatible with a machine running PowerShell version 4.

The following MOF configuration file was created on a machine running PowerShell v5:


Here’s the same MOF file created on a machine running PowerShell version 4:


Removing those two lines allows the configuration to complete successfully without issue. For a single MOF file manually modifying it probably wouldn’t be an issue, but what if you had dozens or more? Then there’s the question as to why you would want to do anything manually that you could use PowerShell to automate? After all, that is the purpose isn’t it?

Here’s a function to remove those two lines from one or more MOF files:

The path to the files can be provided via parameter or pipeline input:


Now that those two lines have been removed from the MOF file, let’s try to apply the configuration again:





  1. FoxDeploy

    Mike, if both machines are running PS v5, does this still come up?

  2. Jeffery Hicks (@JeffHicks)

    Good detective work. For now, I think the best practice is not to mix PowerShell versions with DSC.

  3. R Alladi

    Mike, I’m experimenting with DSC to install SQL Server. I am running into the error ‘Undefined DSC Resource’. I have the xSQLServer resource in the $env:PSModule path. Get-DSCResource shows xSQLServer but Get-Module doesn’t bring up any of the modules associated with it. I am on Windows 2012 R2 with PS 4.0. Any ideas, please?

  4. Luc F

    Hello Mike,

    Thank you for this explanation.
    I am currently using the released version 5.
    It seems like there are some additional lines to be removed :

    MinimumCompatibleVersion = “1.0.0”;



    I have adapted your script with those lines to remove and it works fine for me.

  5. Patrick

    Using Powershell 5.0 as the push server and attempting to push to a server using Powershell 4.0
    Updated the MOF file as directed removing the the 4 lines but I am still getting the same error.
    Anywhere else to check?

    Undefined property ActionAfterReboot
    At line:20, char:2
    Could not retrieve the Local Configuration Manager settings.
    + CategoryInfo : SyntaxError: (root/Microsoft/…gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MiClientApiError_Failed

  6. Patrick

    Both Server are Windows 2012 R2


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: