I'm having trouble administering a Windows 2k8 Server SP2 instance (hosted on EC2) with powershell from my Windows 7 client. When I try to run:
Invoke-Command {Get-Service} -ComputerName ec2-184-73-111-34.compute-1.amazonaws.com
I receive the following error:
Connecting to remote server failed with the following error message : The WinRM client cannot complete the operation within the time specified. Check if the machine name is valid and is reachable over the network and firewall exception for Windows Remote Management service is enabled. For more information, see the about_Remote_Troubleshooting Help topic.
On the server I have: (1) Connected with RDP (the server is reachable), and (2) run Enable-PSRemoting
On my client I have: (1) Added the EC2 instance to TrustedHosts
I've also tried running the above command on the server with the Windows firewall completely disabled, but that didn't solve the problem either. I've also verified there's a firewall exception for Windows Remote Management.
The tutorial I've been referencing is: http://blogs.iis.net/thomad/archive/2010/08/12/managing-windows-amazon-ec2-machines-remotely-with-powershell.aspx