Activate Microsoft Office 2021:If you’ve installed Microsoft Office 2021 and want to activate it without purchasing a retail key, this article will guide you through the process using Command Prompt (CMD). This method uses Microsoft’s KMS (Key Management Service) activation, intended for Volume License editions. It is legal only if you’re part of an organization that has a KMS license.
⚠️ Disclaimer
This guide is intended for educational purposes only. Using unauthorized or pirated KMS servers to activate Office may violate Microsoft’s terms of service and local laws. For personal or commercial use, consider buying a genuine Office license from Microsoft or an authorized reseller.
Method 1: Manually Activate Office 2021 Using CMD
Step 1: Run CMD as Administrator
- Press
Win + S
and type cmd. - Right-click on Command Prompt and select Run as administrator.
Step 2: Navigate to the Office Installation Folder
Depending on whether you installed the 32-bit or 64-bit version of Office, run the following commands one by one:
cCopyEditcd /d %ProgramFiles(x86)%\Microsoft Office\Office16
cd /d %ProgramFiles%\Microsoft Office\Office16
If one path fails, the other is likely correct.
Step 3: Install Office 2021 Volume License Files
Paste the following command to install the KMS client license files:
for /f %x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x"
Step 4: Configure the KMS Server and Activate
Now configure the activation settings and apply the KMS client key.
cscript ospp.vbs /setprt:1688
cscript ospp.vbs /unpkey:6F7TH >nul
cscript ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH
cscript ospp.vbs /sethst:e8.us.to
cscript ospp.vbs /act
📌 If you see error 0xC004F074
, it typically means the server is busy or your internet connection is unstable. Retry the activation step after a few minutes.
Success Message
When the process is successful, you will see:
<Product activation successful>
Congratulations! Office 2021 is now activated.
Method 2: Use a Pre-Written Batch Script
If you’re not comfortable running individual commands, use the following batch script to automate the activation process.
🟢 Step 1: Create a CMD Script File
- Open Notepad and paste the following script:
@echo off
title Activate Microsoft Office 2021 (ALL versions) for FREE - office.com
cls
echo =====================================================================================
echo #Project: Activating Microsoft software products for FREE without additional software
echo =====================================================================================
echo.
echo #Supported products:
echo - Microsoft Office Standard 2021
echo - Microsoft Office Professional Plus 2021
echo.
(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")
(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")
(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)
echo.
echo =====================================================================================
echo Activating your product...
cscript //nologo slmgr.vbs /ckms >nul
cscript //nologo ospp.vbs /setprt:1688 >nul
cscript //nologo ospp.vbs /unpkey:6F7TH >nul
set i=1
cscript //nologo ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH >nul || goto notsupported
:skms
if %i% GTR 10 goto busy
if %i% EQU 1 set KMS=kms7.office.com
if %i% EQU 2 set KMS=e8.us.to
if %i% EQU 3 set KMS=e9.us.to
if %i% GTR 3 goto ato
cscript //nologo ospp.vbs /sethst:%KMS% >nul
:ato
echo =====================================================================================
echo.
cscript //nologo ospp.vbs /act | find /i "successful" && (
echo.
echo =====================================================================================
echo.
echo #Activation successful!
echo #Support this project: donate to paypal "devomman@gmail"
echo.
echo =====================================================================================
choice /n /c YN /m "Would you like to visit my blog [Y,N]?" & if errorlevel 2 exit
explorer "https://www.office.com/"
goto halt
) || (
echo The connection to KMS server failed! Trying another...
set /a i+=1
goto skms
)
:notsupported
echo =====================================================================================
echo.
echo Sorry, your version is not supported.
echo.
goto halt
:busy
echo =====================================================================================
echo.
echo Sorry, all KMS servers are busy. Try again later.
echo.
:halt
pause >nul
- Save the file as
office2021.cmd
.
Step 2: Run as Administrator
Right-click on the saved .cmd
file and select Run as administrator.
The script will try to activate Office using one of the public KMS servers.
Auto-Renewal Information
The KMS license is valid for 180 days, but Office will automatically renew the activation if a valid KMS server is reachable.
Conclusion
You now have two ways to activate Office 2021 for free using CMD:
- Manually (command by command)
- Automatically (batch script)
Make sure your Office installation is Volume License based (KMS client edition), or this method will not work.
If you need help checking your license type or Office version, feel free to ask!
1 thought on “How to Activate Microsoft Office 2021 for Free Using CMD”