In Spore for the Windows PC, you can restore health and energy for your ships and ally ships with this cheat code.
1. While you are in the game, press Ctrl + Shift + C.
2. Type refillMotives and press Enter.