Uninstall a Windows product key with slmgr /dlv and slmgr /upk.
slmgr /dlv
Copy the activation id. Then:
slmgr /upk <actionvation id>
Caution: slmgr /upk uninstalls the product key.
slmgr /upk