You could script it with Perl. Have a look at the LWP module or if you can use telnet to configure them have a look at Net::Telnet.