Author Posts

February 22, 2018 at 1:51 pm

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?

February 22, 2018 at 1:55 pm

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?

February 23, 2018 at 3:40 pm

It is my duplicated topic. Please close.

February 24, 2018 at 9:09 am

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