The U.S. Senate Thursday confirmed General David Petraeus as the country 's top military commander in the Middle East .