Unplug the dryer from the wall outlet and then pull it away to give yourself room to work.
Remove the lint screen from either the top of the machine or just inside the door. If the screen sits on top of your dryer, unscrew the holder, as well. The screws sit on the bottom side of where the screen slides into the machine.
Slide a putty knife between the top panel and the body of the dryer on the front, near the left side. You will feel the knife push over a clip. Pull up on the panel slightly as you depress the clip. Repeat the process on the right side of the dryer to loosen the panel.
Pull off the caps from the side of the dryer control console and unscrew it. The console is the raised area that holds the operation controls. If you do not see caps, slide the putty knife between the top panel and console near one end and feel for a clip release. Repeat the process on the other side to loosen the console. Flip it back once it is free from the top panel. The console sits on hinges and will hang from the back of the dryer.
Grasp the top panel on both sides and pull it toward you to remove it. Set the panel aside and look inside the body of the dryer. Locate the wire harness on the right side, near the door switch and unhook it by pulling the two sections apart.
Release the screws on both sides of the door switch. These will be sitting near the switch in the door opening.
Reach your hand inside the dryer and pull out the old door switch. Insert the new switch and secure it with the screws. Connect the switch to the wire harness and reassemble your dryer.