They've done it before, when they replaced the foundation under DOS/Win3/Win95/Win98/WinMe line with WinNT, and Apple did it when they replaced the foundation under MacOS 1-9 with NextStep and called in OS X.
Apple's non-unix line endings (CR) changed to LF, their non-unix path delimiter (:) changed to /, and they were suddenly a major force among non-Apple-targeting developers who had always derided the Mac as a "toy" prior to OS X.
If MS has similar ambitions, they could do again what both they and Apple have done before: toss away millions of lines of kernel code.
Both Windows 9x and classic Mac OS were fundamentally missing features relative to the alternatives at the time, though-- especially classic Mac OS, which (as of OS 9) still lacked proper preemptive multitasking and protected memory (for those who don't remember that era, this was a huge disadvantage in terms of stability and reliability, even compared to 95/98/Me which were roughly contemporaneous).
Current-generation Windows doesn't really have any such flaws-- the underlying kernel seems to be pretty sound, the hardware driver ecosystem around it is the most complete and robust of any mainstream OS, and they seem to be showing now that they can adapt to developer demands without doing something drastic. There's no real compelling reason that I can see for Microsoft to make a transition to Linux (or BSD, if the GPL is too toxic).
In both the pre-WinNT and pre-OS X cases, the OS they discarded was seriously dated and lacking important functionality. Whether you like Windows or not, it's neither of those things. It also has spectacular backwards compatibility that would very tough to lose.
Apple's non-unix line endings (CR) changed to LF, their non-unix path delimiter (:) changed to /, and they were suddenly a major force among non-Apple-targeting developers who had always derided the Mac as a "toy" prior to OS X.
If MS has similar ambitions, they could do again what both they and Apple have done before: toss away millions of lines of kernel code.