kevinsea/dsc-generator

Invalid MOF definition for node -- Exception calling ValidateInstanceText

Closed this issue · 4 comments

After quite a bit of troubleshooting I think I've finally got it paired down to where the error is actually coming from. I've screenshot the full error output below in case you'd like to see it.

Here below is the bit of configuration that seems to be causing the error. When trying to run the configuration sequentially, this seems to be the culprit at least.

xWebSite AddressValidationTest_Site
{
Name = "AddressValidationTest"
Ensure = "Present"
State = "Started"
ApplicationPool = "AddressValidationTest"
PhysicalPath = "D:\Websites\AddressValidation" # This folder must already exist
LogPath = $logFilePath # overriding "D:\websites\logs\LogFiles"
DependsOn = "[xWebAppPool]AddressValidationTest_Pool"
BindingInfo =
@(
MSFT_xWebBindingInformation
{
Protocol = "http"
Port = "80"
IPAddress = "xxx.xxx.xxx.161"
}
MSFT_xWebBindingInformation
{
Protocol = "http"
Port = "80"
IPAddress = "xxx.xxx.xxx.161"
}
)
AuthenticationInfo =
MSFT_xWebAuthenticationInformation
{
}
}

image

Did your DSC script actually have all of the correct values? When I run the generator, I only get [parameter] = [value] in place of the actual values.

As far as I can tell - yes. Keep in mind its in the vicinity of 3000 lines of code so its not like I went through it with a fine tooth comb.

3k lines? Wow. That's a script and a half. I rebuilt the solution and ran the exe again. That seems to have fixed it. Weird. Good luck.

One thing stands out to me, you have an empty AuthenticationInfo. Try removing this:

AuthenticationInfo =
MSFT_xWebAuthenticationInformation
{
}

If it compiles make sure using the default auth is what you want.