How to Restore 'inetpub' Folder on Windows 11, Windows 10
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 also use a new PowerShell script released on May 28.

For those who don't 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 due to 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)
However, that's something most people don't want to do, because IIS also creates a lot of 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 don't 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 the following 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 if you want 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.
You should read it
- Microsoft warns against deleting the 'inetpub' folder on Windows 11
- Users are in an uproar over strange folders after updating Windows
- Instructions on how to use System Restore on Windows
- What is the Windows.old folder and how do you delete it?
- How to use System Restore in Windows: Turn off, turn on, create, restore System Restore
- How to use Backup and Restore on Windows 7?
- Restore previous Windows version from Windows 7
- How to create Restore Point on Windows 10 with just 1 double click
- Instructions for creating backup and restore points (Restore Point) on Windows 10
- How to delete System Restore Points in Windows 10
- How to Do a System Restore
- Instructions for restoring the system on Windows
Maybe you are interested
How to fix 'This Website Is Using Significant Energy' warning on Mac How to install Internet Download Manager on Microsoft Edge How to insert WordArt in Excel How to create text effects in PowerPoint 'Detox' Facebook in a scientific way When an employer asks for the desired salary, this is an extremely smart way of answering