We have had customers asking for the ability to switch on and off power to a device supplied by a “wall wart” or external battery pack without having to plug and unplug the either the power source side or the barrel side every time.
Well, there are a couple of solutions to this problem. A simple solution in the case of using a “wall wart” is to plug it into a power strip with a built-in switch.
Another solution, is to use barrel jack to barrel plug extension cable with a built-in in-line switch. We carry such a part with the standard 5.5mm outer diameter and the common 2.1mm inner diameter; specifically part number 1568-1417-ND.
If the device you are powering requires a 2.5mm inner diameter plug, you can use the 1528-1731-ND to convert from 2.1mm to 2.5mm barrel plug.