The doing, continuing, or performing by a limited liability company of an act, or an executed or wholly or partially executory contract, conveyance or transfer to or by the limited liability company, if otherwise lawful, is not invalid because the limited liability company was without the power to do, continue, or perform the act, contract, conveyance, or transfer, unless the lack of power is established in a court in this state:
(1) in a proceeding by a member against the limited liability company to enjoin the doing, continuing, or performing of the act, contract, conveyance, or transfer. If the unauthorized act, continuation, or performance sought to be enjoined is being, or to be, performed or made pursuant to a contract to which the limited liability company is a party, the court may, if just and reasonable in the circumstances, set aside and enjoin the performance of the contract and in so doing may allow to the limited liability company or to the other parties to the contract compensation for the loss or damage sustained as a result of the action of the court in setting aside and enjoining the performance of the contract;
(2) in a proceeding by or in the name of the limited liability company, whether acting directly or through a legal representative, or through members in a representative or derivative suit, against the incumbent or former managers or governors of the limited liability company for exceeding or otherwise violating their authority, or against a person having actual knowledge of the lack of power; or
(3) in a proceeding by the attorney general, as provided in section 322B.843, to dissolve the limited liability company, or in a proceeding by the attorney general to enjoin the limited liability company from the transaction of unauthorized business.