Script updated to v0.8.92:
-Added another command in section "Remove OneDrive".
-Added comments regarding the usage of "HKLM\SOFTWARE\Policies..." (read note below).
Whenever you see "HKLM\SOFTWARE\Policies..." in the script, we are changing something that can basically be changed directly through GPEDIT.MSC.
Please note that changes in the registry alone do not reflect back to GPEDIT.MSC.
For example, when we add the registry value "DisableFileSyncNGSC" and set it to "1", we're basically telling Windows to Enable the setting "Prevent the usage of OneDrive for file storage".
However, if you open GPEDIT.MSC > Computer Configuration > Administrative Templates > Windows Components -> OneDrive, you'll see that the setting is still "Not Configured".
That's because GPEDIT.MSC updates both the registry and POL files (located inside C:\Windows\System32\GroupPolicy), yet the script only updates the registry.
So if possible, it's better to do it directly through the GPEDIT.MSC interface.