I had a colonoscopy last week and didn't know I was pregnant. What are the risks now. I just had a miscarriage 2 months ago?

Unlikely . Up to 15-20% of all pregnancies end in miscarriage. Colonoscopy is very unlikely to be at all relevant. Why did you have a colonoscopy? Was it inflammatory bowel disease? That may be more relevant to viability of pregnancy. (ibd under good control is better for pregnancy outcome). Talk to your pcp, GI doc, and OB about your concerns.