Set-WebConfigurationProperty/Set-ItemProperty inconsistency under LCM context
There seems to be an issue with the Set-WebConfigurationProperty and Set-ItemProperty cmdlet when using it to set certain IIS settings under certain conditions. This was discovered while addressing Issue #267 to manage log custom fields. It was a niche scenario, but running the same Set-WebConfigurationProperty twice consecutively always ensured the expected setting was applied. This also only happened under the context of the LCM and not while running the Set-TargetResource function under user context.
Using the added functionality in PR #342 , this issue can be reproduced using the xWebsite Integration test if Set-WebConfigurationProperty is only run once inside the Set-LogCustomField function in MSFT_xWebsite.psm1.