Check current license, detailed and concise
slmgr /dlv
slmgr /dli
Rearm activation trial, remaining Windows rearm count can be found in the current license info.
slmgr /rearm
Uninstall the product key of the current Windows edition
slmgr /upk
Remove the product key from the registry
slmgr /cpky
Install product key
slmgr /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
Attempt online activation
slmgr /ato