Security minister Ben Wallace said the NHS had followed some "pretty good procedures" in combating the cyber attack.
Technical staff restored data and replaced security patches over the weekend at trusts across the country, Mr Wallace said.
He told BBC Breakfast the Government had put £1.2 billion into combating cyber attacks during the last strategic defence and security review, including a £50 million pot to support NHS IT networks.
And he defended the Government after a National Audit Office report in November warned that taking money away from NHS services would leave them vulnerable.
He insisted individual trusts have enough money to protect themselves against cyber attacks, saying: "We make sure the trusts are aware of their vulnerabilities and ask them to make sure they keep themselves up to date. What we don't do in our NHS is micromanage it from the desk."
Mr Wallace said it was a "red herring" to focus solely on the Windows XP operating system as being vulnerable, saying the virus had also attacked both Windows 7 and 8.1.
The "real key" was whether trusts had regularly backed up data and whether they were installing security patches.
Hospitals have stopped diverting patients following last week's cyber attack which crippled many NHS Trusts' IT systems.
A young computer expert from north Devon who was hailed a hero for helping to stop the global cyber attack said he was just "doing my bit".
One surgery has no access to medical records.