A Hennepin County judge has ordered an Excelsior company that’s being sued by Minnesota Attorney General Lori Swanson to stop selling any more small wind turbines to farmers and to produce an accounting of its earlier sales within two weeks.

The order, issued late Wednesday afternoon, came in response to a lawsuit Swanson’s office filed last month alleging that Renewable Energy SD (RESD) and its owner, Shawn Dooling, 46, of Shorewood, sold farmers in Minnesota and elsewhere faulty windmills using federal stimulus money aimed at helping the country during the recession. The company either failed to deliver many of the windmills or, in some cases, erected turbines that failed to perform properly or at all, the suit says.

Judge Mary Steenson DuFresne ordered RESD and its officers, employees or agents to stop soliciting or marketing to new customers for wind turbine energy development projects or related products. The order allows the company to fulfill its existing contracts but bars it from misrepresenting or misstating project delivery or completion deadlines “to induce, encourage, or lead any existing customer to pay additional money to the company.

Swanson’s office has identified between 100 and 150 RESD customers and has indications that there may be more. Some 40 customers have filed affidavits in the lawsuit alleging they paid millions of dollars for products that were never delivered, failed to work or produced less energy than promised.

As a result, farmers had to pay interest on money they borrowed to install the units. Rules on federal stimulus money require that the equipment work for at least five years, so farmers might also be forced to repay federal grants they received.

According to Swanson, Dooling and his sales staff promised state-of-the-art wind turbines that would last up to 25 years and qualify for federal grants under the American Recovery and Reinvestment Act of 2009. Dooling, who formerly sold security systems in Minnesota and Missouri, formed RESD in South Dakota about two months after the law took effect. The law provided grants to cover 30 percent of each turbine’s cost.

Swanson’s lawsuit says farmers were told the windmills would produce excess energy that could be sold to the power grid, earning them $700 to $1,300 a month that could be used to recoup their initial costs within five to 10 years. The company promised to quickly obtain the necessary permits, apply for stimulus funds and bank loans and build and maintain the windmills.

The company has said in a statement that it will address customers’ concerns.