Operate a switch from a USB port
You could do this with a microcontroller, and the hardware can be very simple, using something like a PIC18f4550 which can run at 5 volts, you would just need the PIC, a couple of decoupling capacitors, a transistor, relay and flyback diode; there would however be a fairly significant software burden.

A much better solution in your situation is to get a ready made unit off the shelf which provides this functionality, something like this, though I have no experience with it so can't vouch for the quality, it just turned up with a quick google.