module does not exist

This topic contains 3 replies, has 2 voices, and was last updated by  Don Jones 2 months ago.

  • Author
    Posts
  • #96869

    I`m running a configuration via PULL server and it gets this error:
    Job {69867AC0-2E1E-11E8-9E69-0050568A9182} :
    MIResult: 6
    Error Message: The PowerShell DSC resource MSFT_ScriptResource from module does not exist at the PowerShell module path nor is it registered as a WMI DSC resource.
    Message ID: DscResourceNotFound
    Error Category: 7
    Error Code: 6
    Error Type: MI

    I don`t know why it is trying to use 1.0 version... Both PULL and node machines are whit version 1.1

  • #96872

    Don Jones
    Keymaster

    Check the MOF. Something is demanding v1.0 of that module.

  • #96875

    1 instance of MSFT_ScriptResource as $MSFT_ScriptResource1ref
    2 {
    3 ResourceID = "[Script]DisableFirewall";
    4 GetScript = " \n Return @{ \n Result = [string]$(netsh advfirewall show allprofiles) \n } \n ";
    5 TestScript = " \n If ((netsh advfirewall show allprofiles) -like \"State*On*\") { \n Write-Verbose \"One or more firewall profiles are On\" \n Return $false \n } Else { \n Write-Verbose \"All firewall profiles are off\" \n Return $true \n } \n ";
    6 SourceInfo = "C:\\Users\\Administrator\\Documents\\test-repos\\PS-DSC.SQLServer\\ConfigFiles\\2-PreStaging.ps1::28::4::Script";
    7 SetScript = " \n Write-Verbose \"Setting all firewall profiles to off\" \n netsh advfirewall set allprofiles state off \n ";
    8 ModuleName = "PSDesiredStateConfiguration";
    9
    10 ModuleVersion = "1.1";
    11
    12 ConfigurationName = "PreStaging.SQLPullDSC-1";
    };

    Line 10 was ModuleVersion = "1.0";
    Then I changed to 1.1 and it passed. How can I compile MOF file with 1.1 version???

    Thanks a Lot!

  • #96876

    Don Jones
    Keymaster

    Look at the machine you're compiling on, and make sure you're explicitly importing the version you want used.

You must be logged in to reply to this topic.