If you're
that short on power, you should upgrade your power plant. If it's a combat ship and you have the maximum size power plant A-rated, consider engineering it. A G1 overcharged mod gives 12% extra power at the cost of 5% extra heat and 5% lower integrity. G1 armoured gives 4% more power for 4% less heat, 4% more mass and 40% more integrity. You can get these mods at Farseer. Experimental effects, if you have the materials, can further boost power output or reduce heat, for instance.
It sounds to me like you need to learn about module priorities.
Open your right-hand panel and go to the modules tab. On the right of the modules list, you will see a number on each module that consumes power. By default, they are all at <1> You can change this from <1> through to <5>. This number notes the priority of the module. Priotiy <1> is the highest, and will turn off last. If your modules are using more than 100% of your power plant's output, they will turn off. This feature lets you safely exceed power supply in certain situations - say if you want to run very energy-hungry weapons (e.g. plasma accelerators) without your ship shutting down, or when you want to be able to escape with a damaged power plant.
Change the priorities so critical systems are <1>, defensive systems are <2>, offensive systems are <3> and cargo hatch, vehicle hangar, fuel scoop, FSD booster and AFMU (these systems are just gravy on the meat and potatoes) are priority <4>. If you have problems with power using an FSD booster, make that 4 and everything else 5. Priority 5 is, in my experience, only really necessary on extreme edge-case builds.
- Critical systems: thrusters, FSD, sensors, life support - you can still escape if everything else is off.
- Defensive systems: shield, shield boosters, chaff, heatsinks - these will help you escape as they will prevent your core systems going down.
- Offensive systems: your guns - these will protect your defensive systems as long as you blow up your opponent before they get your shields down and attack your power plant.
- Gravy systems: everything else. If you're in combat, these systems basically don't matter and should be off.
Priority 1 and 2 systems are the ones that keep you alive. Priority 1 systems are the ones that should never go down, even when your power plant has been taken out and only produces 40% of its full power.
Doing the above will effectively automate modules switching off. Note that scanners are basically hardpoints, and cannot be separated from guns.
Look at
this build, which illustrates a power-hungry unengineered ship that's starved of power. With
module priorites properly set, it at least now flies and can jump to another system, although it can't shoot back. The solution to the problem is engineering -
this build has G5 efficient plasma accelerators with a G3 overcharged power plant (and thermal spread to keep the heat down). Note that the non-combat-essential modules are powered off due to their low priotiy in combat - you can't interdict, you can't scoop fuel (both are done in supercruise) and you don't need your cargo hatch or SRV when someone is shooting at you.