(a) Unless a lack of power or capacity is asserted in a proceeding described in this section, an act of a corporation or a transfer of real or personal property by or to the corporation is not invalid or unenforceable solely because the corporation lacked the power or capacity to take the action.
(b) (1) Lack of corporate power or capacity may be asserted by a stockholder in a proceeding to enjoin the corporation from doing an act or from transferring or acquiring real or personal property.
(2) If the act or transfer sought to be enjoined is based on a contract to which the corporation is a party and if all parties to the contract are parties to the proceeding, the court may set the contract aside and enjoin its performance.
(3) The court may award compensatory damages to any party to the contract who suffers a loss because of the action of the court. However, the court may not award compensatory damages for loss of anticipated profits to be derived from performance of the contract.
(c) Lack of corporate power or capacity may be asserted by the corporation in a suit brought in its name by the corporation or its receiver, trustee, other legal representative, or in a representative suit brought by a stockholder against its present or former officers or directors.
(d) Lack of corporate power or capacity may be asserted by the Attorney General in a proceeding for the forfeiture of the charter of the corporation or to enjoin it from transacting unauthorized business.