You need to add %COMSPEC% (cmd) in there, to get redirection working, like this (use single quotes to help delinate the double-quotes) :

SHELL ' %COMSPEC% /C "C:\Program Files\Symantec\LiveState Recovery\Advanced Server 3.0\Agent\CommandFiles\psservice.exe" \\hocacomms1 query "totalcoms agent" > "test54.txt" '

-Shawn