The military would have several problems in TWD scenario:
Since everyone has been infected, the virus must have been very easy to transmit. Easier than anything we have ever seen. Possibly also a long incubation period. So that most, if not all, were already infected before symptoms (reanimation after death) began to manifest. By the time the government had a handle on what was happening, it would be too late to setup true "safe" zones. Any geographic area would already have infected people within, and since the first symptoms don't occur until the victim dies of other causes, it would be difficult to find unaffected people.
I just looked it up, and it seems that about 6800 people die every day in the United States. If, per the above, most/all people were already infected when reanimation began to occur, and the infection spread at an extreme rate, there would be a large number of "walkers" to deal with very quickly, since the first cases would be a complete surprise. Hospitals would likely be overrun very quickly, with all the doctors and nurses that would be bitten.
Now, certainly within a few days or a week or so, the military would know what was happening and how to kill the walkers. They probably wouldn't really know all the hows and whys, but they would know that people who die come back as walkers, anyone bitten becomes a walker, and it takes a shot or blow to the head to kill them. But with thousands of people dying from natural causes everyday, and many first responders wiped out from the initital outbreak, containment in civilian areas would be impossible. But, they would likely try nonetheless, which would prove futile and would deplete resources.
What's more, the public panic would be unprecedented. The public also would not be educated as quickly as the military was, further complicating matters. Innocent people would be killed, thereby creating more walkers. The sick (from other diseases) would not go to hospitals out of fear (if their local hospital was still functioning).
I agree with those that say the military could easily kill walkers, shooting them in the head, blowing them to bits with heavier weapons, etc. But the problem would be that the walkers would be interspersed with the civilian population. They wouldn't be able to engage large numbers of walkers together until most of the civilians were dead or converted. At that point, it's too late.
The one thing the military could likely do with some effectiveness is set up small safe zones and let some survivors find them.
Still, some military units would be infiltrated by walkers. Most active duty personnel are healthy and aren't dying of natural causes in large numbers, but it would happen in some bases.
There would also be mass desertions. Military personnel are people too, and when they realize their families and friends are dying en masse, they will try to save them despite orders.
Many in the military (as well as civilians) would probably crack mentally given what was going on around them, and what they were being asked to do.