Christopher Thomas, of Beaconsfield, Telford, was found guilty by a jury for the offences, which took place in Brookside in January 2020.
He was sentenced to a total of 14 years in prison, to serve two-thirds.
On January 20 last year the 54-year-old entered the home of his first victim under the cover of the night, wielding a hammer.
Masked with a scarf around his face and joined by an accomplice, Thomas proceeded to attack the woman before he "made a move" towards her young child in the room.
Four days later Thomas targeted another home, "again to do with some form of drug enforcement", the court heard.
Thomas was sentenced on Thursday at Shrewsbury Crown Court, charged with two counts of attempted robbery and having an offensive weapon.
The court heard the first attack on the woman "left a scar on the inside of her lip, caused when a tooth went through her lip when she was hit in the mouth with a hammer".
Katie Fox, prosecuting, said the traumatising attack caused the young child to "wake up screaming in the night".
Ms Fox added: "This was controlled violence met out deliberately by an enforcer who was playing a role in a drug supply line."
The court heard Thomas, who has 58 previous convictions including assaulting a shop security guard and threatening police with a machete in 2009, was known to the victims of both incidents.
Paul Smith, defending, said: "In relation to psychological harm there's great risk where the offence itself is so serious, the psychological harm [to the victim] is inevitably relatively severe.
"I would admit while sad and distressing, there is nothing supported in an evidential way that suggests she's suffering anything beyond what other people who've suffered these types of robberies would have suffered."
Mr Smith added that Thomas was "tackling mental health and drug issues".
Referring to the first attack, judge Anthony Lowe, sentencing, said: "The reason you went into that property was as part of some drug enforcement in order to make sure that, either people didn't compromise the patch that those above you were involved in, or to make sure those who were part of that supply chain remained as part of that supply chain.
"When the victim's very young child appeared, far from causing you to retreat and consider the impact that may have, you made a move that created the impression you might well involve the child.
"Count two was four days later – it appears this is again to do with some form of drug enforcement."
The officer in charge of the investigation, Detective Constable Lisa Roberts, said: “These were shocking offences and we would like to emphasise to the public that West Mercia Police takes these types of offences very seriously. Convictions and sentences such as this are only possible with the engagement of the public in supporting our investigations.
“In this particular case, we would like to commend the bravery of the victims, as well as the witnesses who have been involved in the investigation. I hope that the sentence given to Christopher Thomas will reassure the public and give victims of any crime the confidence to contact us.”