Код:
#include <Constants.au3>
#include <Encoding.au3>
$comand="dsquery"
$foo = Run("powershell " & $comand, @SystemDir, @SW_HIDE, $STDOUT_CHILD)
$out=""
$line=""
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
If $line <>"" Then $out &= $line
Wend
$out = _StringOEM2ANSI($out)
MsgBox(0, "", $out)
Так работает?