而後在記事本中保存以下批處理內容。html
@echo off.net
pushd "%~dp0"rest
dir /b %systemroot%\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >gp.txthtm
dir /b %systemroot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>gp.txtblog
for /f %%i in ('findstr /i . gp.txt 2^>nul') do dism /online /norestart /add-package:"%systemroot%\servicing\Packages\%%i"ci
pauseget
說明:經過dir命令遍歷系統盤servicing目錄,尋找組策略的配置包,找到後寫入到gp.txt文件,而後經過dism命令來安裝組策略包。it