win10家庭版20H2测试:
管理员运行批处理:
@echo off
pushd "%~dp0"
dir /b C:WindowsservicingPackagesMicrosoft-Windows-GroupPolicy-ClientExtensions-Package~3.mum >List.txt
dir /b C:WindowsservicingPackagesMicrosoft-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:WindowsservicingPackages%%i"
pause