module does not exist

Welcome Forums DSC (Desired State Configuration) module does not exist

This topic contains 3 replies, has 2 voices, and was last updated by

 
Keymaster
8 months ago.

  • Author
    Posts
  • #96869

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1,638
    Helping HandTeam Member
    Rank: Community Hero

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

  • #96875

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1,638
    Helping HandTeam Member
    Rank: Community Hero

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

The topic ‘module does not exist’ is closed to new replies.