We have a custom DSC resource that sets Web Configuration Properties. It uses the Get-WebConfigurationProperty and Set-WebConfigurationProperty cmdlets so it relies on the WebAdministration module being available. Since the base image of our servers don’t come with IIS installed, the WebAdministration module isn’t available. Currently we have to lay down a configuration which installs roles and features, including IIS, then we have to apply a second configuration which applies the rest of our settings via our custom resources. We’re trying to combine these 2 configs into one to eliminate steps but when I apply the combined config, DSC throw an error in the event log saying it can’t find the WebAdministration module.
Error Message: Importing module IISItemProperty failed with error - The specified module ‘WebAdministration’ was not loaded because no valid module file was found in any module directory.
I know that we are getting this error because the LCM checks all the dependencies before running the configuration. Has anyone else out there experienced this issue and figured out a workaround?