Take a look at the 'expect' scripting langauge. It originated in the Unix world, but at least one Windows-compatible version is available from www.activestate.com;
With 'expect', you can write scripts that automatically go out on the network, interact with remote systems, login, execute...