Two weeks may be pushing it. What you should do is get the ball rolling now. You can talk to the embassy/consolate and schedule an appointment as soon as they can after you actual marriage. You can't apply before then. Best to also make sure your documents are in a row. You will need a passport from your home country that is good for AT LEAST SIX MONTHS after you apply. You also need the DS-160 appliaction and a color "passport" photo along with your Husband's H1B approval notice and your marriage certificate.