I have this in my dsc config -
Ensure = ‘Present’
Name = ‘Default Web Site’
State = ‘Stopped’
PhysicalPath = ‘C:\inetpub\wwwroot’
DependsOn = ‘[WindowsFeature]WebServer’
The first time it runs successfully, then when I retry it as some other step fails, it gives error as - PowerShell DSC resource MSFT_xWebSite failed to execute Set-TargetResource functionality with error message: Failure to successfully set the state of the website “Default Web Site”. Error: “The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)”.