From the Super Mario Wiki, the Mario encyclopedia
Mario Strikers series
In Super Mario Strikers and Mario Strikers Charged, electric rails appear around all of the soccer fields except for Thunder Island, in which they only appear at the corners. If players get tackled into the fence, they will be shocked temporarily. The fence cannot be seen; it is transparent until players run into it. Some options allow for either electric rails to be disabled or it to shock the player if they even go near the fence.
Super Mario series
Super Mario Galaxy
Electric rails appear in Super Mario Galaxy in the Flipswitch Galaxy, Sweet Sweet Galaxy, Battlerock Galaxy, Toy Time Galaxy, Sand Spiral Galaxy, Dreadnought Galaxy and Bubble Blast Galaxy, where they occasionally move horizontally throughout the galaxy and shock Mario and Luigi if contact is made. They appear in green and red. There are also beams of electricity in Dreadnought Galaxy that act similarly to electric rails. If Mario and Luigi lose a life from an electric rail, he will sometimes turn into a skeleton. This effect is also seen briefly, if the player looks closely, when Mario and Luigi take damage after hitting one. Also worth noting is that no matter which way the camera faces, the reflection on the spheres that make them up shown is always exactly the same.
New Super Mario Bros. Wii
Electric rails make one appearance in New Super Mario Bros. Wii. They appear in the second airship battle against Bowser Jr. The player must knock Bowser Jr. into the fence three times in order to win. However, if Mario and his friends are pushed into the rail, they will take damage.
Super Mario Galaxy 2
In Super Mario Galaxy 2, green electric rails appear in the Flip-Swap Galaxy, Upside Dizzy Galaxy, Space Storm Galaxy, and Grandmaster Galaxy, while red ones appear in Bowser Jr.'s Fearsome Fleet. They retain their function and effect from the previous game, but Mario will no longer turn into a skeleton if he loses a life from an electric rail.
Mario Party series
Mario Party 8
Mario Party 9
Donkey Kong Country: Tropical Freeze
Names in other languages