2.Install Kms Windows10 Pro Public Key.bat

說明: 適用前一章失敗時所用,及家庭版昇級上來時所使用。


@echo off
rem  此選項指定要聯繫的KMS主機的名稱和(可選)端口。設置此值將禁用KMS主機的自動檢測。
rem This option specifies the name and, optionally, the port of the KMS host computer to contact. Setting this value disables auto-detection of the KMS host.
cscript %SystemRoot%\system32\slmgr.vbs -skms 10.40.1.9:1688

echo ====================================================================
echo *   Install GVLK Microsoft Licenses   * 
echo     只適用以下作業系統:Windows10 (專業版)   
echo ====================================================================


rem  嘗試安裝Microsoft Kms Client 產品密鑰。參數提供的產品密鑰已確認有效並適用於已安裝的操作系統。如果不是,則返回錯誤。
rem  如果密鑰有效且適用,則安裝密鑰。如果已安裝密鑰,則會以靜默方式進行替換。
rem  Attempts to install a Microsoft Kms Client product key. The product key provided by the parameter is confirmed valid and applicable to the installed operating system. If not, an error is returned.
rem  If the key is valid and applicable, the key is installed. If a key is already installed, it is silently replaced.
cscript %SystemRoot%\system32\slmgr.vbs -ipk W269N-WFGWX-YVC9B-4J6C9-T83GX


rem  對於安裝了通用批量許可證密鑰(GVLK)的系統,這會提示嘗試激活KMS
rem  For systems with a Generic Volume License Key (GVLK) installed, this prompts an attempt at KMS activation
cscript %SystemRoot%\system32\slmgr.vbs -ato

rem  顯示已安裝操作系統的許可證信息
rem  displays the license information for the installed active Windows edition.
cscript %SystemRoot%\system32\slmgr.vbs -dlv

pause
exit


:: Reference link
   https://docs.microsoft.com/en-us/previous-versions//ff793433(v=technet.10)
   https://docs.microsoft.com/zh-tw/windows-server/get-started/kmsclientkeys

留言

這個網誌中的熱門文章

我的商家-建立簡稱及名稱