Automate Windows Update to use Microsoft Update

Sometimes it is desired to set Windows Update on client devices to look at Microsoft Update instead. Through the GUI this will take some clicks, where I would always like to automate these things… This can be done either by setting a registry key, or you could just use a script.