On 22/08/11 14:39, =?ISO-8859-1?Q?Bernd?= wrote:
> Hallo,
>
> I have a problem. I try to execute a powershell script as precommand in
> savepnpc W2k8R2, NW 7.6.2SP3. The powershell script is executed from a
> batchfile, which is the precommand of savepnpc. The scripts hangs.
>
> Are there some special environment or call parameters neccessary? nsrexecd
> runs as local system. If it runs as local administrator the problem is the
> same.
>
> Has anyone experience with networker and powershell scripts?
I have seen exactly the same thing. It's related to file descriptors
being held open. I think what I did to solve it was closing stderr on
the command line within the precmd field, using:
mypowershellcommand 2>&-
This is probably a bit of a hack and I expect that there's some good
reason why this shouldn't be done, but needs must.
This is not a savepnpc problem, it also applies to other methods of
remote execution with powershell, such as psexec.
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the body of the email. Please write to
networker-request AT listserv.temple DOT edu if you have any problems with this
list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
|