unknown error after start of the mof file execution

Welcome Forums DSC (Desired State Configuration) unknown error after start of the mof file execution

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

 
Participant
8 months, 3 weeks ago.

  • Author
    Posts
  • #94413

    Participant
    Points: 0
    Rank: Member

    Hello,
    Please help me to find the root cause of this error:

    VERBOSE: An LCM method call arrived from computer DESKTOP-JS8HH10 with user sid
    S-1-5-21-1180649135-3716464580-1824886270-1001.
    VERBOSE: [DESKTOP-JS8HH10]: LCM:  [ Start  Set      ]
    VERBOSE: [DESKTOP-JS8HH10]: LCM:  [ End    Set      ]
    Syntax error:
     At line:1, char:13
     Buffer:
    Configuration^ IISWeb
        + CategoryInfo          : SyntaxError: (root/Microsoft/...gurationManager:String) [], CimException
        + FullyQualifiedErrorId : MiClientApiError_Failed
        + PSComputerName        : localhost
    
    VERBOSE: Operation 'Invoke CimMethod' complete.
    VERBOSE: Time taken for configuration job to complete is 0.12 seconds
    

    I am using current mof templete:

    Start-DscConfiguration -Force –Path .\IISWebsite –Wait –Verbose

    Configuration IISWebsite
    {
        param(
            localhost
        )
        Node localhost
        {
            WindowsFeature IIS
            {
                Ensure = "Present"
                Name = "Web-Server"
            }
            WindowsFeature ASP
            {
                Ensure = "Present"
                Name = "Web-Asp-Net45"
            }
            File WebContent
            {
                Ensure = "Present"
                Type = "Directory"
                SourcePath = "C:\Content\BakeryWebsite"
                DestinationPath = "C:\inetpub\wwwroot\"
                Recurse = $true
            }
        }
    } IISWebsite -NodeName "localhost"
    

    i have tried it on different os: windows 10, server 2012 r2 and server 2016 and with different powershell versions 4.0 and 5.1 but still no luck. Error still persists.

    Also tried different mof files but got still the same error.

    What i am doing wrong?

  • #94416

    Participant
    Points: 0
    Rank: Member

    Hello,
    Please help me to find the root cause of this error:

    VERBOSE: An LCM method call arrived from computer DESKTOP-JS8HH10 with user sid
    S-1-5-21-1180649135-3716464580-1824886270-1001.
    VERBOSE: [DESKTOP-JS8HH10]: LCM:  [ Start  Set      ]
    VERBOSE: [DESKTOP-JS8HH10]: LCM:  [ End    Set      ]
    Syntax error:
     At line:1, char:13
     Buffer:
    Configuration^ IISWeb
        + CategoryInfo          : SyntaxError: (root/Microsoft/...gurationManager:String) [], CimException
        + FullyQualifiedErrorId : MiClientApiError_Failed
        + PSComputerName        : localhost
    
    VERBOSE: Operation 'Invoke CimMethod' complete.
    VERBOSE: Time taken for configuration job to complete is 0.12 seconds
    

    I am using current mof templete:

    Start-DscConfiguration -Force –Path .\IISWebsite –Wait –Verbose

    Configuration IISWebsite
    {
        param(
            localhost
        )
        Node localhost
        {
            WindowsFeature IIS
            {
                Ensure = "Present"
                Name = "Web-Server"
            }
            WindowsFeature ASP
            {
                Ensure = "Present"
                Name = "Web-Asp-Net45"
            }
            File WebContent
            {
                Ensure = "Present"
                Type = "Directory"
                SourcePath = "C:\Content\BakeryWebsite"
                DestinationPath = "C:\inetpub\wwwroot\"
                Recurse = $true
            }
        }
    } IISWebsite -NodeName "localhost"
    

    i have tried it on different os: windows 10, server 2012 r2 and server 2016 and with different powershell versions 4.0 and 5.1 but still no luck. Error still persists.

    Also tried different mof files but got still the same error.

    What i am doing wrong?

  • #94492

    Participant
    Points: 0
    Rank: Member

    It is my duplicated topic. Please close.

  • #94554

    Participant
    Points: 0
    Rank: Member

    hi there Kostiantyn,

    you have to define the parameter "NodeName" if you want to use that to specify a nodename

    sample like this
    Configuration IISWebsite
    {

    Param(
    [string]
    $NodeName
    )

    Node localhost
    {
    WindowsFeature IIS
    {
    Ensure = "Present"
    Name = "Web-Server"
    }
    WindowsFeature ASP
    {
    Ensure = "Present"
    Name = "Web-Asp-Net45"
    }
    File WebContent
    {
    Ensure = "Present"
    Type = "Directory"
    SourcePath = "C:\Content\BakeryWebsite"
    DestinationPath = "C:\inetpub\wwwroot\"
    Recurse = $true
    }
    }
    }

    IISWebsite -NodeName "localhost"

    If you don't want to use a parameter to set a specific target you could also remove the parameter()

    for more information i suggest you check this link https://docs.microsoft.com/en-us/powershell/dsc/configurations

The topic ‘unknown error after start of the mof file execution’ is closed to new replies.