Today I discovered the Start-IISCommitDelay and Stop-IISCommitDelay cmdlets available in the IISAdministration module. In the past I’ve randomly encountered errors when issuing back to back commands that modify the applicationHost.config file:
Filename: \\?\C:\Windows\system32\inetsrv\config\applicationHost.config
Error: Cannot write configuration file