To enable Key Management Service (KMS) or use Active Directory Based Activation (ADBA), a special key is used that tells the OS to use the organization's KMS or ADBA to activate, instead of the Microsoft online clearing service
slmgr.vbs /ipk <the KMS product key>
slmgr.vbs -skms <ip of you KMS> if you don't have a srv record or different domain
slmgr /ato