! Switch
The ! Switch was first seen in Super Mario World. The switches come in four colors, Yellow, Green, Blue and Red. Stomping on the switches activates them. When activated, they turn Dotted Line Blocks into ! Blocks of the corresponding color. They have the same purpose in Super Mario 64 and Super Mario 64 DS.
In Super Mario World 2: Yoshi's Island and Yoshi's Island DS, red ! Switches could be stomped on to transform Dotted Line Blocks into red ! Blocks. These would allow the Yoshi to cross an abyss, spikes or to reach an inaccessible area.
In Super Mario 64, the yellow ! Switch isn't present since the yellow ! Block is available by default.
They are later found in the Paper Mario series. This time, the switches only appear red or blue. Blue switches can only be used once, and normally open passages of some kind. Red switches can be used an unlimited amount of times, and are normally used for moving important objects. However, the red ! Switches found in the Palace of Shadow in Paper Mario: The Thousand-Year Door are the only red ! Switches that can only be used once to move a wheel allowing Mario and his friends to get to the Shadow Queen's throne room and crypt. There are also black and white ! Switches found in the Great Tree. Mario and company pushed the black switch to reveal four white ! Switches in the room where Mario found the blue key to free the other Punies. Mario had to hit the white ! Switches in this order: Sun, Moon, Puni and Star to retrieve the Super Boots.
The ! Switch also appeared in New Super Mario Bros. Wii. It can be accessed after the player beats 3-5. After the switch is hit, all the invisible Dotted Line Blocks turn into Red Switch Blocks, which give access to 3-4's goal. Hitting the ! Switch is needed for completion of World 3. Also, the ! Switches replace the Skull Switch in Bowser's final battle.
In Mario Pinball Land, a Red ! Switch appears in each world. If Mario hits one of these switches hard enough, 8 Red Coins pop out and have been landed in almost every area in the world. Mario has to find 8 Red Coins around the world within the time limit. Hitting the switch is worth 3000 points as it is used. If Mario didn't get all the Red Coins, Mario has another chance to get all the Red Coins. But if Mario gets all the Red Coins on time, Mario obtains the Power Star, if collected; the deactivated switch is changed into a Red ! Block.