To resolve this, log into the VM and run the following commands:
winrm set winrm/config/service/auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
powershell
Enable-NetFirewallRule -DisplayName "Windows Remote Management (HTTP-In)"
netsh firewall add portopening TCP 5985 "Port 5985"
You can confirm these commands had the intended effects by once again running the following:
winrm get winrm/config
Confirm that "
AllowUnencrypted = true" and "
Auth: Basic = true" under Service. It should not matter whether these are set as true under Client. You can confirm that the firewall rules were configured properly by running:
Get-NetFirewallRule -DisplayName "Windows Remote Management (HTTP-In)"
Finally, restart the VM and run stembuild construct against it.