Run this script with Administrator privileges to remove user habits and diagnostic data reporting to Microsoft.
The script is really suitable for Windows 7 and 8, but Windows 10 has many more spying "features" for which dedicated programs exist. For Windows 10, please choose one from the following comparison: http://www.ghacks.net/2015/08/14/comparison-of-windows-10-privacy-tools
The script is mostly based on information available at https://redd.it/3g7hr0 . It got further extended.