2009-08-03 4 views
6

psexecを使用してサーバー上でexeを実行しています。 コマンドは正常に実行されますが、ローカルコンソールに出力はありません。PSEXECを使用すると、リモートタスクからの出力が返されません。

psexec.exe \\my-machine ping localhost 

になり:

この

は私が使用しているコマンドである私は、しかし、これはとlocalY実行しようと

PsExec v1.94 - Execute processes remotely 
Copyright (C) 2001-2008 Mark Russinovich 
Sysinternals - www.sysinternals.com 

ping exited with error code 0. 

、それが正常に動作し

psexec.exe \\localhost ping localhost 

PsExec v1.94 - Execute processes remotely 
Copyright (C) 2001-2008 Mark Russinovich 
Sysinternals - www.sysinternals.com 



Pinging my-machine.mydomain.com [1.1.1.1] with 32 bytes of data: 

Reply from 1.1.1.1: bytes=32 time=2ms TTL=128 
Reply from 1.1.1.1: bytes=32 time<1ms TTL=128 
Reply from 1.1.1.1: bytes=32 time<1ms TTL=128 
Reply from 1.1.1.1: bytes=32 time<1ms TTL=128 

Ping statistics for 1.1.1.1: 
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), 
Approximate round trip times in milli-seconds: 
    Minimum = 0ms, Maximum = 2ms, Average = 0ms 
ping exited on localhost with error code 0. 

答えて

4

それを少なくとも(この場合は)psexecを起動するときに完全修飾マシン名を使用する必要があることが分かります。 私はこれがなぜであるのか分かりませんが、それはトリックです。

psexec.exe \\my-machine.mydomain.com ping localhost 

このコマンドのすべての出力が返されます。

+1

私にとってはうまくいかない私はfqnと一緒に試してみた。 psexec.exe以外のツールがありますか – Maverick

+0

どちらかの方法で動作します。 – aphoria

+0

5年後には、MSが後方互換性を維持すると思いますが –

関連する問題