Exerting control of the magnetic exchange interaction in heterostructures is of both basic interest and has potential for use in spin-based applications relying on quantum effects. We here show that the sign of the exchange interaction in a spin-valve, determining whether the ferro- or antiferromagnetic configuration is favored, can be controlled via an electric voltage. This occurs due to an interplay between a nonequilibrium quasiparticle distribution and the presence of spin-polarized Cooper pairs. Additionally, we show that a voltage-induced distribution controls the anomalous supercurrent that occurs in magnetic Josephson junctions, obviating the challenging task to manipulate the magnetic texture of the system. This demonstrates that two key phenomena in superconducting spintronics, the magnetic exchange interaction and the phase shift generating the anomalous Josephson effect, can be controlled electrically. Our findings are of relevance for spin-based superconducting devices which in practice most likely have to be operated precisely by nonequilibrium effects.