Something like this?
Code:
break on
$RC = SetOption('WrapAtEOL','on')
$Path = 'C:\Program Files\Symantec\LiveState Recovery\Advanced Server 3.0\Agent\CommandFiles\'

$ShellCMD = '%comspec% /c ""' + $path + 'psservice.exe" \\hocacomms1 query "totalcoms agent" >"test54.txt""'
$ShellCMD ?

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.