Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 am trying to enable win rm in mixed domain mode on a new machine.

From another work station, I can connect with the following command:

Enter-PSSession -ComputerName -Credential $mycred

I have ran Enable-PSremoting on the new machine but when I execute the following command, I get:

Enter-PSSession : Connecting to remote server failed with the following error message : Access is denied. For more info rmation, see the about_Remote_Troubleshooting Help topic. At C:\Users\Dev1\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:93 char:17 + Enter-PSSession <<<< -ComputerName -Credential $mycred + CategoryInfo : InvalidArgument: ( [Enter-PSSession], PSRemotingTransportException + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

It is the InvalidArgument that strikes me as odd.

Interestingly, I can execute remote commands with:

powershell.exe -ExecutionPolicy unrestricted C:\root\deploy.ps1 -inputformat none

share|improve this question

Does the user account in your PSCredential object belong to the administrators group of the target machine?

Did you run winrm quickconfig on the new machine in an elevated command prompt? It should start the winrm service and create a winrm listener on tcp port 5985 with the corresponding firewall exception. You can then try to run winrs -r:http://<targetmachine>:5985 -u:<targetmachine>\<administrator account> "dir c:\" and see if it outputs the contents of C:. This shows you that winrm is working correctly.

After that try running Enable-PSRemoting on the target machine again (again in an elevated Powershell prompt).

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.