I guess they started with assembler languages and c# was almost exclusively used by Microsoft for a while. They probably use many other languages, though. VBA is in all their Microsoft Office products, SQL is in MS Access and SQL Server etc.
Languages used by Microsoft (top 10): http://www.eweek.com/development/top-10-microsoft-programming-languages
Windows was made in C++ (source: https://stackoverflow.com/questions/580292/what-languages-are-windows-mac-os-x-and-linux-written-in )