部署 Office LTSC 2021 批量授权版本

0、前言

本文仅提炼总结关键步骤,详情可见官网文档:https://learn.microsoft.com/zh-cn/deployoffice/ltsc2021/deploy?cid=kerryherger

1、建立安装目录

新建任意名称的目录 C:\Users\abc\Desktop\officefiles,用于归档部署过程中产生的文件。

2、下载 Office 部署工具

1)下载部署工具到 officefiles 目录,官网地址:https://www.microsoft.com/download/details.aspx?id=49117

2)双击 officedeploymenttool.exe 可执行文件,选择提取文件路径,也直接放在 officefiles 目录

3、创建 configuration.xml 文件

1)使用 Office 自定义工具创建 configuration.xml 文件,工具地址:https://config.office.com/deploymentsettings

2)根据需求选择 office 套件、语言,大多数选项保持默认即可。配置完成后导出,放在 officefiles 目录

注意:配置文件名称必须是 configuration.xml

3、下载 Office LTSC 2021 安装文件

1)以管理员身份打开 cmd,进入目录 C:\Users\abc\Desktop\officefiles

2)执行 setup /download configuration.xml,此时在 officefiles 中会包含名为 Data 的新目录。

4、安装 Office LTSC 2021

1)以管理员身份打开 cmd,进入目录 C:\Users\abc\Desktop\officefiles

2)执行 setup /configure configuration.xml,安装完成后,将返回到命令提示符

安装路径默认在 C:\Program Files\Microsoft Office

5、激活

1)以管理员身份打开 cmd,进入目录 C:\Program Files\Microsoft Office\Office16

2)假设已部署的 kms 服务器 ip 为 192.168.1.5,执行 cscript ospp.vbs /sethst:192.168.1.5 设置 kms 服务器地址。出现以下提示说明配置成功:

1
2
3
4
5
---Processing--------------------------
---------------------------------------
Successfully applied setting.
---------------------------------------
---Exiting-----------------------------

可参考 部署 kms 服务器 的内容建立 kms 服务器

3)执行 cscript ospp.vbs /act 激活。出现以下提示说明配置成功:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Microsoft (R) Windows Script Host Version 5.812
版权所有(C) Microsoft Corporation。保留所有权利。

---Processing--------------------------
---------------------------------------
Installed product key detected - attempting to activate the following product:
SKU ID: fb61ac9a-1688-45d2-8f6b-0674dbffa33c
LICENSE NAME: Office 21, Office21VisioPro2021VL_KMS_Client_AE edition
LICENSE DESCRIPTION: Office 21, VOLUME_KMSCLIENT channel
Last 5 characters of installed product key: K2HT4
<Product activation successful>
---------------------------------------
Installed product key detected - attempting to activate the following product:
SKU ID: fbdb3e18-a8ef-4fb3-9183-dffd60bd0984
LICENSE NAME: Office 21, Office21ProPlus2021VL_KMS_Client_AE edition
LICENSE DESCRIPTION: Office 21, VOLUME_KMSCLIENT channel
Last 5 characters of installed product key: 6F7TH
<Product activation successful>
---------------------------------------
---------------------------------------
---Exiting-----------------------------

6、其他

官方提供了上述使用到的 GVLK 列表(使用 Office 自定义工具创建 configuration.xml 文件时已经自动填写),详见:用于 KMS 和基于 Active Directory 的 Office、Project 和 Visio 激活的 GVLK