Not recommended for production computers but this will get the WinRM working on a development computer.
Enable-PSRemoting -Force Set-WSManQuickConfig -SkipNetworkProfileCheck winrm set winrm/config/client/auth '@{Basic="true"}' winrm set winrm/config/service/auth '@{Basic="true"}' winrm set winrm/config/service '@{AllowUnencrypted="true"}' Set-Item wsman:\localhost\client\trustedhosts * Winrm enumerate winrm/config/listener Restart-Service WinRM New-NetFirewallRule -DisplayName "Windows Remote Management (HTTPS-In)" -Name "Windows Remote Management (HTTPS-In)" -Profile Any -LocalPort 5986 -Protocol TCP New-NetFirewallRule -DisplayName "RemotePowerShell" -Direction Inbound –LocalPort 5985-5986 -Protocol TCP -Action Allow Test-WSMan 10.40.20.174 Invoke-Command -ComputerName 10.40.20.174 -ScriptBlock { Get-ChildItem C:\ } -credential dkittell
If you can’t connect due to access denied try this
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f