Metformin for PCOS

Hi just wondering if anyone has ever been prescribed metformin for PCOS? currently had 3 misscarges last one was February 2019 gyne has gave me 6 weeks worth said it should hopefully make me ovulate been on them for 4 weeks now not long just finished my cycle he also said it can prevent misscarges ?