Wheatley will guide you through this section, so just listen to him and make careful jumps.
Portal onto the Turret Redemption Line, ride it to the other end, and jump across to the other side. For a quick Achievement/Trophy, pick up the functional turret coming toward you. When you reach the turret firing range, use the gap in the window on the upper left to portal yourself behind the bullet-riddled wall. Wait until you hear good 'ol Nolan North - one of the defective turrets - before walking out from behind the wall and portaling to the passageway behind the turrets.
Follow the path to Wheatley. After he "hacks" the door, portal into the room containing the template and remove it. You can score another easy Achievement/Trophy by standing in the scanner by yourself. To sabotage the turret line, go back the way you came and stand at the back of the platform by the incinerator chute. When a defective turret is launched toward you, grab it, and return it to the template scanner.
While Wheatley ponders the door problem, press the big red button to open it. Before walking through the door, fire a portal at the spot where the laser beam meets the wall. Wheatley will attempt to hack the neurotoxin controls - ignore him and walk to the back of the room, where you have a view of the tank. Fire portals onto the moving platforms on each side, redirecting the laser and slicing through the tubes. Once you've destroyed the tank, return to Wheatley.
There's nothing for you to do here, just enjoy the ride!
When you reach the large void, look for a lit surface in the distance. Portal through it, and into GLaDOS' chamber. From there, you don't have to do much, except press the Stalemate Resolution Button. GLaDOS will try to stop you, but you can reach the button using - you guessed it - portals to avoid her shields.