Which type of Pokemon are affected by the move "Whirlwind"?

Solution 1:

Whirlwind has a different effect in trainer battles vs. wild battles. Against trainers in the first generation game, it has no effect. Starting in generation 2 trainer battles, it forces them to switch out to a new pokemon at random. If they have no other pokemon, it has no effect.

No pokemon typing will cause immunity, but the ability Suction Cup or the move Ingrain will cause it to fail.