At times you may find that Office cannot locate the KMS server on its own, and you’ll get a notification that Office is not activated.
To resolve this issue, run the following commands.
Modify the path to the Office install folder as needed:
cd /d “C:\Program Files\Microsoft Office\Office16”
cscript ospp.vbs /sethst:[FQDN of KMS server]
cscript ospp.vbs /act