Corporate boards these days are more prepared for an activist, lawyers say. And they have a variety of tactics at their disposal, depending on the situation. Many advisers these day tell a company to try and talk with the activist first and attempt to avoid the noise of a public spat. But if peace talks fail, most companies are prepared for a bitter battle.

Ackman’s recent investments provide insights into the different ways management can react to an activist.

J.C. Penney — Work with him, unless it falls apart – When Ackman and his partner Vornado showed up in October 2010, J.C. Penney had little choice other than to give him a board seat. He had amassed in a 10-day window a 16.5% stake and the real-estate investors at Vornado had another 10%. Then Ackman led the charge to replace Mike Ullman with Ron Johnson, Apple Inc.’s star retail executive. Johnson took over as CEO and attempted a turnaround that significantly altered who J.C. Penney’s target shopper was, only to see sales plunge. Johnson left in April, and Ullman returned. Four months later, Ackman went public with a push to oust Ullman, which led to Ackman resigning from the board after the company pushed back.

Air Products & Chemicals — Learn from J.C. Penney and block him first – Air Products, the industrial gas company, became Ackman’s latest target last month when he revealed a 9.8% stake, his biggest investment ever. But, Air Products had seen unusual movements in its shares and known Ackman had publicly described an upcoming target that could have been the company. The company instituted a poison pill even before he identified the company. That stopped him from taking more than 10%, which he said he would have done. The company has said it is open to discussing ideas with its holders, and so far, two-weeks later little has come out about Ackman’s ideas. The stock is down 1.5% since before he announced his stake.

In Target, he fought the fight and lost when shareholders supported management overwhelmingly. He sold out his shares years later. The stock had gone down during the time of his public investment.

In Herbalife, he isn’t actually attempting to work with the company. He is shorting it and wants it shut down by regulators. The company has launched a counterattack and has several big investors, currently including Carl Icahn and George Soros’ fund, on its side. So far, Herbalife is winning, with shares up 95% this year, though the stock is down 3% in recent trading as the New York Times is reporting on more concerns about its health products.