Start-Job Powershell not starting

I am trying to start a simple workflow in powershell 2.0 and does not seem to work.

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

When I call $ job, the status says it works. But the problem is that it never ends.

Tried the same thing on my windows 7 machine and it exits immediately.

I am running powershell 2.0 on windows xp.

Does anyone know what causes 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
+3
source share
1 answer

I would say that your XP PowerShell configuration is “slightly” changed. :-) It should work on CLR version 2.0, for example:

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 restarting reg-hack (or Powershell.exe.config mode) so that PowerShell 2.0 runs on .NET 2.0 and finds out if there is a problem.

+5
source

Source: https://habr.com/ru/post/1769666/


All Articles