Ertapenem is effective against complicated infections, such as community-acquired pneumonia, complicated urinary tract infections, skin and soft tissue infections, pelvic infections, and certain abdominal infections. It is also used to prevent infections after specific surgeries, like colorectal procedures.