The story of getting Apollo 13 back was pretty amazing. The answer to the power in the command module is that they had none. The entire fuel cell based system was dead. The only power source left were three storage batteries that were intended to run the command module for about half an hour, after they had jetissoned the support module (which contained the fuel cells) during re-enty. They partially depleted one of these in the time between losing the fuel cells and getting the LM powered up.
So, the task before the flight engineers was that the CSM had no power at all. They were down well past the point where they were violating design constraints on the hardware. For instance the navigation system was shut down. The question arose about whether they could afford the power to keep the tiny heaters inside the gyros on. Turning them off was outside the allowable limts. The nav system was critical. No nav system, no re-entry. There was not enough power and even these tiny heaters were turned off. They pulled 0.8 Amps. As it was, the gyros spun up OK, and the nav system worked. In the end nothing was left running.
The LM only had batteries. It had a clear lifetime, and the return trip was longer than this, twice as long. So not only had the CSM no power, but the power available in the LM was insufficient to power the LM alone. So the LM was shut down as far as possible. The minimum power configuration designed was 20 Amps. They had to get it down to 15. It took 50 when fully powered. This limit was twofold. Not only was there insufficient power, but the LM relied on evaporating water to make ice, whihc cooled glycol the keep the electronics cool. There wasn’t enough water to keep the system cool this long. So they had to power down to conserve both water and power.
Other thermal issues had to be kept OK. The reason Apollo slowly rotated (the barbeque roll) was to even out the heat on the re-entry shield. There was evidence that if the shield got too cold it could fail. So the simple solution (rather than a very expensive - in money and time - redesign) was to slowly roll the spacecraft. After the explosion, the crew of Apollo 13 were seriously tired. They had powered down the CSM, powered up the LM, and the system was basically safe. But they still had to get the roll correct. Dead tired, and only using the LM thrusters, but it had to be done.