Locate the studs inside the wall where you're installing the vent fan with a stud finder.
Cut a small hole into the wall between the studs with a drywall saw. Stick your hand inside the wall and feel around for electrical wires. If there are wires present, patch the hole in the wall and place the fan in a different section of the wall.
Trace the template for the fan onto the wall. Use the fan housing if the manufacturer did not include a template.
Cut a hole in the wall with the drywall saw, following the line you traced.
Trace an old-work electrical box onto the wall between two wall studs where you want to install the light switch. The old-work box shields the light switch inside the wall, and is used on a finished wall. Cut a hole in the wall with the drywall saw for the electrical box.
Drill four holes through the exterior wall along the edge of the hole you cut for the fan housing on the interior wall. Position the holes at noon, three o'clock, six o'clock and nine o'clock.
Trace the template or fan housing onto the exterior wall, using the pilot holes you drilled as a guide when aligning the template.
Cut a hole in the exterior wall with a reciprocating saw. Follow the outline of the template, and start sawing by placing the tip of the saw into one of the pilot holes. Wear safety goggles when sawing the wood.
Run a 12/2 electrical cable between the hole in the wall for the light switch and the hole for the vent fan, and a second cable between the light switch hole and the main electrical box. Do not connect the wiring to the electrical box. A 12/2 cable has two insulated 12-gauge wires and a bare copper ground wire.
Place the fan housing inside the hole in the wall, following the manufacturer's instructions for the fan you purchased.
Remove 2 inches of sheathing from the cable, and 1 inch of insulation from the black and white wires inside the cable on the ends of the cables, with wire strippers.
Connect the black wire from the fan to the black wire from the electrical cable with a plastic twist cap, then connect the white wires together with a twist cap. Wrap the bare copper wire around the ground screw inside the housing, then connect it to the ground wire from the fan with a twist cap.
Go outside to the location of the fan and place the wall cap against the side of the house over the fan. The wall cap is the cover that is placed over the fan. Check to see if there are any gaps between the wall cap and the side of the house; if there is, place a rubber gasket between the house and the wall cap. Screw the wall cap to the house. Place a thick bead of clear silicone adhesive over the screws and around the edge of the wall cap to prevent leaks.
Return inside the house and apply spray foam insulation into the wall cavity around the outer edge of the fan housing.
Attach the grille to the fan housing.
Punch out the knockout hole on the back of the old-work box. Slide the ends of the electrical cables through the knockout hole, then slide the box into the hole in the wall and screw it to the wall.
Bend the ends of the black and white wires in the cables into hooks with a pair of pliers. Hook the black wires over the brass-colored terminal screws on the sides of the light switch and tighten the screws, then attach the white wires to the silver-colored terminal screws. Cut a piece of copper wire 3 inches long from the leftover cable, and screw one end to the ground screw on the bottom of the light switch. Twist the other end of the 3-inch piece together with the bare copper wires inside the cables with a plastic twist cap.
Tuck the wiring into the electrical box, then insert the light switch into the box. Screw it into place with the mounting screws, then attach the plate cover to the switch.
Hire an electrician to wire the circuit for the fan into your home's main electrical box. Most municipalities forbid anyone except a licensed professional from connecting circuits to the main panel for safety reasons.