4

PowerShell 2.0 has some super-snazzy remoting features. However, I'm unclear if they can be made to work with / between Windows XP machines, or if you need Windows Vista or Windows 7.

Here's what I have:

  • A pair of Windows XP MCE machines with SP3 installed, along with .NET 3.5.

  • PowerShell 2.0 CTP3 is installed on both.

  • WS-Management v1.1 installed on both (as 2.0 doesn't seem to work on Windows XP?)

With all that in place, the "Enable-PSRemoting" still nets me this error:

Enable-PSSessionConfiguration : Windows PowerShell remoting features are not enabled or not supported on this machine. This may be because you do not have the correct version of WS-Management installed or this version of Windows does not support remoting currently.

Ordinarily, my response at this point would be to say "well, I guess it's time to download the Windows 7 RC," but I've seen enough vague comments about people remoting in and out of Windows XP to make me think this is possible.

How can I get this to work?

Peter Mortensen
  • 2,319
  • 5
  • 23
  • 24
Electrons_Ahoy
  • 1,801
  • 3
  • 14
  • 16

5 Answers5

5

Right now you can't use PowerShell remoting feature on windows XP because it depends on WinRM 2.0 CTP3 that's not available for it. Support for remoting on Windows XP will be available after final build of PowerShell V2 (and WinRM 2.0).

aleksandar
  • 319
  • 2
  • 2
  • That's what I was starting to think. The final version of 2.0 doesn't have a release date yet, does it? – Electrons_Ahoy May 15 '09 at 22:30
  • 1
    The final version of PowerShell V2 will be a part of Windows 7 and Windows Server 2008 R2. During the TechEd 2009 keynote Bill Veghte from Microsoft announced that Windows 7 will RTM this Holiday Season. Consumers should be able to purchase a Windows 7 preloaded PC this Christmas. Version for Windows XP should be available shortly after that. – aleksandar May 16 '09 at 08:03
3

I know this isn't exactly what you're looking for but a possible alternative, which will almost certainly work across XP to Vista, is running your Powershell script remotely via either:

psexec - Microsoft (made by Mark Russinovich, enough said!)
rctrlx (my tool) - More powerful than psexec in certain situations
Remcom - Open source

That way you don't need to install anything on either machine apart from Powershell

Leon Sodhi
  • 101
  • 1
  • 3
  • Thanks! PSExec looks like just what the doctor ordered, but I'm having some trouble resolving network permissions? See follow-up question here: http://serverfault.com/questions/8805/psexec-access-is-denied – Electrons_Ahoy May 15 '09 at 22:57
1

I have not been able to make PowerShell work between Vista and XP or XP and XP. Looks like it is a Vista and up kind of program at this point.

I have put 10 or 15 hours into this...so maybe someone else as succeeded..but I have not bee able to achieve the needful on this one.

Thomas Denton
  • 686
  • 5
  • 13
1

You can cheat using some trickery with WinRS to get it working with V1.

function Invoke-RemoteCommand 
{ 
param( 
$ComputerName, 
[SCRIPTBLOCK]$script 
) 
    $encodedScript = [System.Convert]::ToBase64String([System.Text.Encoding]::UNICODE.GetBytes($script)) 
    $objects = Winrs "-r:$ComputerName" PowerShell -OutputFormat XML -NoProfile -NonInteractive -EncodedCommand $encodedScript 
    Write-Output $objects 
}

Invoke-RemoteCommand localhost {gps} |where {$_.handles -ge 500} |sort handles

The -encodedScript is an undocumented switch for PowerShell.exe in V1. It just tells PowerShell to take a base64 encoded string as a command. It makes life a little easier for parsing etc if your scriptblock gets kind of long and ugly.

Andy Schneider
  • 1,533
  • 5
  • 19
  • 28
0

It hasn't been officially released yet but you can now get Powershell V2 and WinRM V2 for Server 2003 and Windows XP Release through Microsoft's Connect site. This should allow you to use PowerShell's remoting features to and from Windows XP.

Chris Magnuson
  • 3,701
  • 9
  • 40
  • 45
  • Actually, PowerShell version 2 has been officially released. Installers for down-level clients can be found here: http://support.microsoft.com/kb/968929 – Marcus Nov 13 '09 at 17:44
  • @Marcus Hot darn =). Please post an answer indicating that and I will delete mine and upvote yours. – Chris Magnuson Nov 19 '09 at 23:10