Table of Contents
This updated guide explains how to restore 'inetpub' folder on Windows 11, Windows 10 with clear steps, practical tips, and useful context. If you have deleted the ' inetpub ' folder, which was created after the Windows April 2025 Update - you need to restore it immediately, otherwise your system will remain vulnerable to potential security threats.
Microsoft has announced that this folder can be restored when you enable the IIS service, or you can use a new PowerShell script released on May 28.

For those who do not know, Windows 11 24H2 and older versions of Windows, including Windows 10, created a folder called 'inetpub' after the April 2025 Updates. This empty folder is usually related to Internet Information Services (IIS) – a Windows native service that allows developers to host websites or apps on Windows 11.
Empty Inetpub Folder in Windows 11 KB5055523
In the case of Windows 11, Microsoft created a folder (C:inetpub) with KB5055523 or later, which contains nothing and the properties show that the folder is 0 bytes in size.

Microsoft has since updated their documentation to state that the 'inetpub' folder was created as part of the security patch for CVE-2025-21204, and that it will appear regardless of whether you have IIS enabled or not. Some advise against deleting it, and if you do, to restore it following Microsoft's previous instructions.

'The security vulnerability CVE-2025-21204 occurs because of an issue with improper link resolution before accessing files ('link following') in the Windows Update Stack, which could mean that, on unpatched devices, Windows Update could follow symbolic links in a way that allows a local attacker to trick the system into accessing or modifying unwanted files or folders,' Microsoft notes in the document.
Previously, Microsoft told Windows Latest that the 'inetpub' folder could be recreated with the same level of security by enabling Internet Information Services (IIS) from Control Panel > Programs > Programs & Features > Turn Windows features on or off.
Internet Information Services (IIS)

Still, that is something most people do not want to do, because IIS also creates many extra directories, which are unnecessary if you're not a developer.
If you accidentally deleted that folder, you can use a new PowerShell script that can recreate this folder, and you do not need to enable IIS anymore, as follows:
How to Use PowerShell Script to Restore 'inetpub' and Patch CVE - 2025 - 21204
Step 1: Run PowerShell as Administrator.

You cannot do this with an account that does not have administrative privileges because we are trying to change directory permissions (ACLs) and install modules. These operations require admin privileges.
Step 2: In PowerShell, first enable signed scripts and modules from the Microsoft PowerShell Library using these command: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass.

Step 3: Download the script from PowerShell Gallery with the command - Install-Script -Name Set-InetpubFolderAcl -Force

Step 4: Install NuGet Provider (if prompted): In some cases, you will be asked to install 'NuGet Provider' if it is not already available. Just answer 'Y' to continue, then run the Install-Script command again.

Step 5: Run the script to recreate the folder: Set-InetpubFolderAcl
If you get an error like 'command not found', run the full path below
& "C:Program FilesWindowsPowerShellScriptsSet-InetpubFolderAcl.ps1"
After completing all the above steps, you will see the inetpub folder appearing again in your C drive.
FAQ
What should I prepare before I restore 'inetpub' folder on windows 11, windows 10?
Review the requirements and options in the guide first. Having the correct device, app version, account access, or materials ready helps prevent avoidable errors.
How long does it take to restore 'inetpub' folder on windows 11, windows 10?
The time depends on the task and your setup. Most basic steps can be completed quickly, while downloads, updates, scans, or troubleshooting may take longer.
What should I do if the steps do not work?
Repeat the instructions in order, confirm that your software or device is supported, and check permissions, connectivity, and available updates before trying again.
Reader Comments 0
Sign in with email or Google to join the discussion.