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?
The Layman's Guide To PowerShell Remoting has a section on remoting in workgroups. It should get you what you need.
There's also the Administrator's guide to PowerShell Remoting
User contributions licensed under CC BY-SA 3.0