This might also work on Windows 10, I haven't tried it.
1. Open an elevated command prompt.
2. slmgr.vbs /upk
3. slmgr.vbs /cpky
4. slmgr.vbs /ipk PRODUCT KEY
OPTIONAL (do it if you have a problem, maybe do it even if you don't)
5. slmgr.vbs /ATO
Reboot
Enjoy!