PowerShell, the shell that Microsoft Windows uses (don’t confuse it with the command line, PowerShell is way more powerfull than that) is now Open Source, note Open Source, not Free Software. Why does Microsoft opened its Shell?.
Well, I suppose that marketing team got a hit with the “Microsoft ❤️ Linux” slogan, but the true is that no, Microsoft does not Love Linux.
Microsoft has changed a lot, but is not just because Microsoft suddenly wanted to be the good guy. Please remember how is that Microsoft become one of the most popular software companies in the world. Without taking credits of being a doer. Bill Gates bought DOS to a company, modified it and resold it as MS-DOS, that gave it the chance to surpass the others since Microsoft was not tied to a computer vendor. They needed an OS.