I'm trying to connect to a newly spun up AWS EC2 Windows Nano Server from my OS X machine.

I'm running powershell from OSX and am following these instructions

PS /Users/alex/Projects> $ip = "ec2-x-x-x-x.eu-west-1.compute.amazonaws.com"

PS /Users/alex/Projects> Set-Item WSMan:\localhost\Client\TrustedHosts $ip  

Set-Item : Cannot find drive. A drive with the name 'WSMan' does not exist.
At line:1 char:1
+ Set-Item WSMan:\localhost\Client\TrustedHosts $ip
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (WSMan:String) [Set-Item], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetItemCommand

I tried to ignore this and move onto the remaining 2 steps:

PS /Users/alex/Projects> $user = "$ip\Administrator"                                                                                        
PS /Users/alex/Projects> Enter-PSSession -ComputerName $ip -Credential $user     

Windows PowerShell credential request
Enter your credentials.
Password for user ec2-x-x-x-x.eu-west-1.compute.amazonaws.com\Administrator: ********************************

At line:1 char:1
+ Enter-PSSession -ComputerName $ip -Credential $user
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (ec2-x-x-x-x...e.amazonaws.com:String) [Enter-PSSession], PSInvalidOperationException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

See powershell for macOS known issue list: https://github.com/PowerShell/PowerShell/blob/master/docs/KNOWNISSUES.md#remoting-support

Client-side remoting from Linux/macOS is not supported with the initial package. The work is being done in the psl-omi-provider repo.


You are wanting an interactive shell login? If so, why not ssh from a Mac OS X terminal? The command would be something like:

ssh -i ~/.ssh/filename.pem ec2-user@eyourmachine.amazonaws.com

where the pem file can get created following these instructions:


  • Does the EC2 Windows Nano Server AMI run sshd by default? – jscott Jan 5 '17 at 11:26
  • There's no ec2-user on Windows instances and there's no default SSH process running so this "solution" is just noise. Is there a way you can delete it? – Rick O'Shea Jul 15 '17 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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