# Remotely execute application on another PC connected via a crossover cable

I have two PCs that are both running Windows XP SP3, referred to as PC1 and PC2. They are connected to each other through cross-over ethernet cable. PC1 has the static IP address 10.0.0.1 and PC2 has the static IP address 10.0.0.2. I want to invoke a commandline executable on PC2 from PC1. I did some research and it seems that the Windows Powershell invoke-command would allow me to do just that. I am logged in as a member of the Administrators Group, and running the Windows Powershell Console As Administrator.

This command fails:

PS C:\Documents and Settings\Administrator> invoke-command -computername 10.0.0.2 -scriptblock { hostname }


With the following error:

[10.0.0.2] Connecting to remote server failed with the following error message : The WinRM client cannot process the request
. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use winr m.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can get more information about that by running the following command: winrm help config. For more information, see the about_Rem
ote_Troubleshooting Help topic.
+ CategoryInfo          : OpenError: (:) [], PSRemotingTransportException
+ FullyQualifiedErrorId : PSSessionStateBroken


When I try to run this command:

winrm quickconfig


I also get an error:

WSManFault
Message = Access is denied

Error number: -2147024891 0x80070005
Access is denied


I read Enabling Powershell Remoting, Access is denied? and realized that I'm not connected to a domain.

Do I need to be connected to a domain to issue remote commands through Windows Powershell?

Is there another easier way to remotely execute applications on PC2 from PC1?

-

2. On all the workgroup joined computers – including Windows XP, Windows Vista and later – you need to add the IP addresses of all remoting clients to the list of trusted hosts. To do this, Set-item wsman:localhost\client\trustedhosts -value * –  szielenski Mar 1 '13 at 21:32
Okay, so I figured out how to show the window. I decided to use PSTools instead. If you call psexec \\10.0.0.1 -i "c:\path\to\remote\executable.exe" it will execute the application on the remote PC will the IP address 10.0.0.1 and show the window. PSTools link: technet.microsoft.com/en-us/sysinternals/bb896649.aspx –  szielenski Mar 4 '13 at 22:52