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
- 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
May be interested
- What is the 'System Volume Information' folder, and can this folder be deleted?on windows drives, even external usb drives, you will see a folder called system volume information. and you will only see this folder if you set hidden files and folders on the system only. so what is the 'system volume information' folder, and can this folder be deleted?
- Instructions for creating backup and restore points (Restore Point) on Windows 10restore point, which was first introduced in windows me version, is one of the best and unique features of windows operating system, which helps users quickly restore system files to their current state. previous status without changing saved data.
- How to reset the default folder view settings in Windows 10this guide will show you how to reset folder view settings, preview width and details, and navigation width back to default preferences in windows 10.
- How to set the default name of a newly created folder according to the current date on Windows 10by default, when you create a new folder in windows 10, that folder is automatically named 'new folder'. there is absolutely no problem with this name, but you do not like it and want to use the current date itself as the folder name for easy management, just follow these steps.
- How to use System Restore in Windows: Turn off, turn on, create, restore System Restoresystem restore is a windows utility that allows users to restore the status of a window at a certain time. the time of recovery can be set by the computer or by the user. software, data from the time of restore are deleted.
- Instructions to restore Windows 10 to the newly installed staterestore windows 10 when the computer fails to help users return the computer to its original state, clean up junk on windows and speed up the computer after a period of use.
- What does the red 'X' on Windows folders mean?do you see a red circle with a white cross to the left of your windows files, folders, or drives? if so, it means onedrive isn't syncing and the folders affected by this issue aren't syncing properly.
- How to change the download folder Windows Update in Windows 10by default, the windows 10 update is downloaded to the softwaredistribution folder on drive c and hidden in windows 10. moving the folder will not be as simple as usual and need to be logged on as an administrator. the new folder used in this tutorial is newupdatefolder located in drive d. you can change the name and location to anywhere you like.
- Instructions to delete Windows.old folder on Windows 7/8 / 8.1?usually after you reinstall windows without deleting the old partition, windows 7/8 / 8.1 will appear a new folder in drive c with the name windows.old. what is that? that is the folder containing all the system files of the old windows version, when not deleted, the system will automatically collect all in one folder and name it windows.old.
- How to roll back Windows 11 updatesif your computer has just installed the windows 11 update but some errors occur, you can completely restore the windows 11 update.