0

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?

1 Answer 1

1

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

6
  • This fixed my problem (excerpt from Layman's Guide above): 1. You need to make sure the local security policy to enable classic mode authentication for network logons. This can be done by opening “Local Security Policy” from Control Panel -> Administrative Tools. Over there, navigate to Local Policies -> Security Options and double click on “Network Access: Sharing and Security Model for local accounts” and set it to classic.
    – sizzle
    Mar 1, 2013 at 21:30
  • 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 *
    – sizzle
    Mar 1, 2013 at 21:32
  • Do you know how to get the application to show the window? I'm able to execute it but it's not showing the the window (I can see it in the process manager so I know it's running).
    – sizzle
    Mar 1, 2013 at 22:22
  • I don't think that's possible. Remoting isn't connected to the user session in order to present the window. Mar 1, 2013 at 22:33
  • 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
    – sizzle
    Mar 4, 2013 at 22:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .