Running Start-DscConfiguration gives "the network connection to the computer name has been interrupted"
I am running the following local cmd server on the server:
Start-DscConfiguration -computername mycomputer -Path C:\install -Wait -Verbose
Output:
WARNING: [WSManNetworkFailureDetected] The network connection to the computer name has been interrupted. Attempt to reconnect up to 4 minutes ...
This is a new server and I started Enable-PSRemoting -Force
and Windows Management Service started.
source to share
I started getting this error and I made sure that the problem turned out to be the size of the script: when I commented out part of it, the error goes away.
Searching the web Finally I found that the problem was MOF size (over 500kb).
The solution was to run the following command before starting Start-DscConfiguration:
Set-Item WSMan:\localhost\MaxEnvelopeSizekb 1000
The answer was found here: https://powershell.org/forums/topic/dsc-configuration-size/
Please note that you may need to use a larger value depending on your case.
source to share