I realize this is an old thread, but I just had this error. The cause was the powershell part failing to run because I had a NIC set to public connection type.
The powershell error was:
Set-WSManQuickConfig : WinRM firewall exception will not work since one of the network connection types on this machine
is set to Public. Change the network connection type to either Domain or Private and try again.