I think it depends on what you think it was intended to do. If it was intended to shame her, to make her an "example" of what happens to those who stray from "the way," then it succeeded.
However, if it were intended to make Hester a total outcast from the community, then it did not accomplish what they intended. Despite before isolated from the community, being the one the preachers use as example of the consequences of sin, Hester becomes the seamstress to the community and does a great deal of good for the downtrodden in the community, even though they often scorn her after accepting the good that she does for them.
Hester grows into a better human being as a result of the "A" --- this is difficult to say because we have no idea what she was like before the "A" so "better" is just based upon what Hawthorne tells us about the improvements in her life as she lives in the community. I doubt the magistrates could have imagined the "A" coming to men Able or Angel.
Yes, the scarlet letter did accomplish the purpose that the magistrates intended, though it also accomplished much more. The magistrates gave Hester the punishment of wearing the A so that she would be labeled as an adulterer for the rest of her life, and for all to see. The fact that she returned to Salem, continued to wear the A until she died, and had only a marker with the A on it after she died, shows that the A continued to define her character.
However, it is worth noting that the A accomplished much more as well. The meaning changed within the town's viewpoint as Hester became a servant to the sick and hurting. The magistrates even considered removing it at one point, but Hester wanted to continue to wear it. Though it continued to define her, she found her own sense of identity and acceptance through the separation that it caused.