Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Powershell Start-Job won't run

I'm trying to run a simple job process in powershell 2.0 and it doesn't seem to run.

    $job = Start-Job { Return "Some string." }

When I call $job, the status says it's running. But the problem is that it never completes.

Tried the same thing on my Windows 7 machine and it completes immediately.

I'm running powershell 2.0 on windows xp.

Does anyone know what is causing this problem? How can I fix this problem?

This is my $PSVersionTable

    Name                           Value
    ----                           -----
    PSVersion                      2.0
    PSCompatibleVersions           {1.0, 2.0}
    BuildVersion                   6.0.6002.18111
    PSRemotingProtocolVersion      2.1
    WSManStackVersion              2.0
    CLRVersion                     4.0.30319.1
    SerializationVersion           1.1.0.1
like image 482
foureight84 Avatar asked Dec 05 '25 07:12

foureight84


1 Answers

I'd say your XP configuration of PowerShell is "somewhat" modified. :-) It should be running on CLR version 2.0 e.g.:

Name                           Value
----                           -----
CLRVersion                     2.0.50727.3615
BuildVersion                   6.0.6002.18111
PSVersion                      2.0
WSManStackVersion              2.0
PSCompatibleVersions           {1.0, 2.0}
SerializationVersion           1.1.0.1
PSRemotingProtocolVersion      2.1

Try resetting the reg hack (or the Powershell.exe.config mod) so that PowerShell 2.0 is running on .NET 2.0 and see if the problem still exists.

like image 102
Keith Hill Avatar answered Dec 08 '25 00:12

Keith Hill



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!