Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a powershell v2 script that I'd like to run against a remote server. When I run it, I get the error :

Connecting to remote server failed with the following error message : The WinRM client cannot process the request. Unencrypted traffic is currently disabled in the client configuration. Change the client configurati on and try the request again. For more information, see the about_ Remote_Troubleshooting Help topic.

I looked at the online help for about _ Remote_Troubleshooting, but it didn't point me towards how to enable unecrypted traffic. Below is the script that I'm using that is causing me problems.

Note: I have already run Enable-PSRemoting on the remote machine to allow it to accept incoming requests.
I have tried to use a session option variable, but it doesn't seem to make any difference.

$key = "HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds"
Set-ItemProperty $key ConsolePrompting True

$tvar = "password"
$password = ConvertTo-SecureString -string $tvar -asPlainText –force
$mySessionOption = New-PSSessionOption -NoEncryption 
$credential = New-Object System.Management.Automation.PSCredential($username,$password)

invoke-command -filepath C:\scripts\RemoteScript.ps1  -sessionoption $mySessionOption -authentication digest -credential $credential -computername RemoteServer

How do I enable unencrypted traffic?

share|improve this question

New-PSSessionOption has a -NoEncryption option.

$PSSessionOption = New-PSSessionOption -NoEncryption
share|improve this answer
Thanks for the response. I added a sessionOption to my call and still get the same error. I've edited my question to include this command. Am I missing something? – Peter Walke Sep 24 '09 at 18:20
I see you asked your question here also:… Does the answer there help? – Dennis Williamson Sep 24 '09 at 19:37

On the server side, you need to configure WinRM (the underlying service that mediates remote invocation) to use unencrrypted HTTP transport. Look up "winrm quickconfig".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.