Thursday, 6 October 2016

SharePoint DSC - Write-NodeMOFFile : Invalid MOF definition for node 'localhost': Exception calling "ValidateInstanceText"

Do you ever get the feeling you’re on your own?  This is how it must have been for everyone back in the old days. Before Google.

So having had the last 12 months working in SharePoint 2010, there was literally nothing I couldn’t do… or more accurately, there was literally nothing I couldn’t find a solution to on Google.

But now I am back out there at the pointy end, struggling with the simplest points of SharePointDSC.

I have been using this new resource for a total of about 3 hours, and the last 2 hours of that time I have been stumped on creating a new SharePoint Web Application (SPWebApplication).

I had some initial success creating a new Site Collection (SPSite), I even created a SPManagedAccount, but the SPWebApplication proved elusive.


The compile-time error looked like this:

Write-NodeMOFFile : Invalid MOF definition for node 'localhost': Exception calling "ValidateInstanceText" with "1" argument(s): "Convert property 'ApplicationPoolAccount' value from type 'INSTANCE' to type 'STRING' failed

The fix?

I knew it was going to be something stupid… I just knew it!

When it comes to the ApplicationPoolAccount parameter, it is expecting the UserName of the account, not the credential with password of the account.

1 comment: