Hello,
I might be misunderstanding exactly what you're looking for, however, if you simply want to run a command, wait for the output, and record it... a possibilty with Perl is
Net::Telnet?
(If you have a telnet service running on the box)
Connecting to a Windows box this way does have it's drawbacks because of the way Telnet is handled by Msoft. But it is doable.
-------------------------
Cave ab homine unius libri