Fix 'Windows Cannot Find gpedit.msc' in Windows 11!

Vigneshwaran Vijayakumar - Jun 20 - - Dev Community

Cause: The Group Policy Editor is disabled on Home editions and only available for Pro, Enterprise, and Education editions.

Windows Cannot Find gpedit.msc

Solution: Enable gpedit.msc using a batch file method.
Create a batch file with provided code.

  • Batch file code is:
@echo off

pushd "%~dp0"

dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~31bf3856ad364e35~*.mum >gp.txt

dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~31bf3856ad364e35~*.mum >>gp.txt

for /f %%i in ('findstr /i . .\gp.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"

pause
Enter fullscreen mode Exit fullscreen mode
  • Save it with a .bat extension.
  • Run the batch file as an administrator.
  • Verify by running gpedit.msc from the Run dialog.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .