1. 新建一个文本文件将下面代码粘到里面,保存后修改后缀为.cmd或者.bat
@echo off
pushd "%~dp0"
dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"C:\Windows\servicing\Packages\%%i"
pause
2.右键文件,选择以管理员身份运行
3.待命令运行完毕后,win+r打开运行命令框
输入 gpedit.msc 回车即可打开本地组策略编辑器