Upgrading from WMF 5 Production Preview to RTM breaks DSC

This topic contains 6 replies, has 5 voices, and was last updated by Profile photo of Georg Aminger Georg Aminger 10 months, 2 weeks ago.

  • Author
    Posts
  • #33221
    Profile photo of Zuldan
    Zuldan
    Participant

    Just a heads up, don't "upgrade" your servers from Production preview to RTM. You'll get the following error when using Set-DScLocalConfigurationManager.

    ————————————-
    No instance found with given property values.
    At C:\temp\dsctest.ps1:172 char:5
    + Set-DscLocalConfigurationManager -ComputerName mymachine -Path ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : HRESULT 0x8033801a
    + PSComputerName : mymachine
    ——————————-

    To fix, perform the following;

    1. Uninstall RTM, reboot
    2. Uninstall Production Preview, reboot
    3. Install RTM, reboot

  • #33233
    Profile photo of Alex Aymonier
    Alex Aymonier
    Participant

    This is documented under https://msdn.microsoft.com/en-us/powershell/wmf/limitation_dsc

    DSC cmdlets may not work if WMF 5.0 RTM is installed on top of WMF 5.0 Production Preview
    Resolution: Run the following command in an elevated PowerShell session (run as administrator):
    mofcomp $env:windir\\system32\\wbem\\DscCoreConfProv.mof

  • #33237
    Profile photo of Zuldan
    Zuldan
    Participant

    Thanks for the heads up Alex. I wish they mentioned that link when RTM was announced. Googling the issue I had didn't bring it up .

  • #33280
    Profile photo of tommymaynard
    tommymaynard
    Member

    Thanks for the link, Alex. I needed it, too.

  • #33311
    Profile photo of Alex Aymonier
    Alex Aymonier
    Participant

    Also fyi, it looks like wmf5 has been pulled as it resets the module path back to defaults.

  • #33368
    Profile photo of Aaron Jensen
    Aaron Jensen
    Participant

    Thanks Alex. Running that mofcomp command fixed this for me, too. I was getting a "not found" error from Get-DscLocalConfigurationManager:

    
    $ Get-DscLocalConfigurationManager
    Get-DscLocalConfigurationManager : Not found 
    At line:1 char:1
    + Get-DscLocalConfigurationManager
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get-DscLocalConfigurationManager], CimException
        + FullyQualifiedErrorId : HRESULT 0x80041002,Get-DscLocalConfigurationManager
    
    
  • #36364
    Profile photo of Georg Aminger
    Georg Aminger
    Participant

    I had the same issue.
    error:

    PS C:\tools> Get-DscConfiguration
    No instance found with given property values.
        + CategoryInfo          : InvalidArgument: (root/Microsoft/...gurationManager:String) [], CimException
        + FullyQualifiedErrorId : HRESULT 0x8033801a
        + PSComputerName        : localhost
    
    PS C:\tools> $Error[0].CategoryInfo
    
    
    Category   : MetadataError
    Activity   :
    Reason     : CimException
    TargetName : root/Microsoft/Windows/DesiredStateConfiguration:MSFT_DSCLocalConfigurationManager
    TargetType : String
    

    start powershell as admin
    1)

    mofcomp $env:windir\\system32\\wbem\\DscCoreConfProv.mof
    

    2)

    Stop-DscConfiguration
    

    It takes a long time to solve it 🙁

You must be logged in to reply to this topic.