The right of election of the surviving spouse may be exercised in whole or in part only during his lifetime by him or by his agent in accordance with section 5603(d) (relating to implementation of power of attorney). In the case of a minor spouse, the right of election may be exercised in whole or in part only by the spouse's guardian; in the case of an incapacitated spouse, the right of election may be exercised in whole or in part only by the spouse's guardian or by his agent in accordance with section 5603(d) if the power of attorney qualifies as a durable power of attorney under section 5604 (relating to durable powers of attorney); provided, that, in each case, the election shall be exercised only upon order of the court having jurisdiction of the minor's or the incapacitated person's estate, after finding that exercise of the right is advisable.
20 Pa.C.S. § 2206