Here's how it worked from a technical perspective ten, or so, years ago, when I worked in the industry:
Ads come in automatically via satellite twice per day, in big batches of 20-40 spots. They are automatically recorded onto a single tape (a computer was put online for this a few weeks before I left the station--it was a different ad distribution company, I believe, and so only a few ads were running off of this system, so I'm not deeply familiar with it, but it was fully automated, with no human intervention required to go from ad network to air). The single tape was then processed by a tape operator (me) onto individual tapes, and labeled with a barcode, for use in the master control automated tape loader. Turnaround time was usually an hour or two from the usual spot feed, and the spots were usually airing by the next day.
When an ad had a mistake, a special feed would be scheduled...sometimes within hours of the mistake being found and the ad producer being notified. A new version of the ad could definitely be online the same day. With the automated computer system, I suspect it could be replaced in minutes.
However, spot production is a somewhat different story. Depending on the size of the production, it could take weeks to schedule all of the pieces to fall into place. That said, with enough money and enough muscle (which Microsoft has in spades), a large scale production could be done in days or even hours.
To put things further into perspective, the station I worked for (WB 39 in Houston) also had a production division, and would occasionally make spots practically in real-time for local advertisers to tie into ongoing events like Rockets games. Adding running commentary of the game to spots, by the usual spokesperson for the company (like Mattress Mac), was a reasonably common practice. If Microsoft really wanted to change directions fast, they could do it. It'd cost them two or three times as much (if they were a normal customer...though their agency may have eaten some of the cost just to keep MS happy through these trying times and the perceived disaster that is the spots they'd already produced), and the agency would have to re-schedule other customers productions (or pay lots of overtime), but it could definitely be done.