How do I use PowerShell background jobs which require windows authentication

Posted by Scott Weinstein on Stack Overflow See other posts from Stack Overflow or by Scott Weinstein
Published on 2010-04-20T16:51:04Z Indexed on 2010/04/21 1:43 UTC
Read the original article Hit count: 342

I'm trying to run some funtions in the background of a PoSh script. The job never completes, but works fine when called normall. I've narrowed the problem down to the following line:

This line works fine:

$ws = New-WebServiceProxy  "http://host/Service?wsdl" -UseDefaultCredential

but this line blocks forever

start-job { New-WebServiceProxy "same url" -UseDefaultCredential } `
 | wait-job | Receive-Job

Some details: the service is local, and requires windows authentication. Client is XP & server 2003.

Why? How do get it to work?

© Stack Overflow or respective owner

Related posts about powershell-v2.0

Related posts about remoting