Summary
- Microsoft has intentionally created the inetpub folder in your Windows installation drive.
- You should not delete the inetpub folder to keep your device safe.
- If you've mistakenly deleted the folder, you can restore it by running a PowerShell script.
Have you deleted the empty inetpub folder from your Windows installation drive, thinking it was of no use? If so, you should restore it using the PowerShell script that Microsoft has shared, as this folder is very important for your device’s security.
Microsoft regularly releases security updates to fix known issues. In April, they released security update KB5055523 for Windows 11 and KB5055518 for Windows 10. After downloading the update, many Windows 11 and 10 users, including myself, found a new inetpub folder in the Windows installation drive.

The folder is related to Internet Information Services (IIS), which allows developers to host websites or apps on Windows. This service is disabled by default but can be enabled through Windows Features. When the inetpub folder is created by IIS, you'll find various subfolders inside it, such as history, logs, temp, and more.
Since the inetpub folder created following the April security update for Windows 10 and 11 does not contain any sub-folders and was also found on devices without the IIS service enabled, it was widely believed that the folder was created due to a bug or glitch in the update. As a result, many users deleted it.
Microsoft later updated the KB5055523 support document, stating that by downloading the security update, a new %systemdrive%\inetpub folder will be created on your computer. This folder is created as part of the process that addresses a security vulnerability in the Windows Process Elevation service, which Microsoft refers to as CVE-2025-21204. The support document also mentions that the folder will appear on every system with the KB5055524 update installed, regardless of whether the IIS service is enabled or not.
As a heads-up, the CVE-2025-21204 vulnerability allows unauthorized agents to exploit symlinks to elevate their permissions for performing or manipulating file management operations using the Windows servicing stack and the inetpub folder on the Windows installation drive. To address this issue, Microsoft released the April security update, which pre-creates the inetpub folder in the Windows installation directory.
Don’t worry if you don’t understand some of the details here—the main point is that the inetpub folder is quite important for your security, and you should not delete it. But what if you have already deleted the folder?

I Made These 5 Changes to Windows Security for Optimal Safety
Outmaneuver the menace before it strikes.
How to Restore the Inetpub Folder?
Since the inetpub folder is ultimately empty, you might consider creating a new folder named inetpub if you've deleted it. Unfortunately, this approach will not work.
As it turns out, the inetpub folder that Microsoft creates after installing the April update contains special permissions that cannot be replicated by creating the folder in the usual way. If you right-click the columns tab, select "More," and then check the "Owner" box, you'll see the Owner column in File Explorer.
This column shows "System" as the owner of the inetpub folder created by Microsoft, indicating that the folder has certain important permissions provided by Microsoft. Whereas the inetpub folder you create manually will display your username in the Owner column.

That said, there are three ways to restore the inetpub folder on your Windows computer. The first is by restoring the folder from the Recycle Bin. However, this method will only work if you have not permanently deleted the folder.
The next method is to enable the IIS service in Windows Features. To do this, open the Start Menu, type "Control Panel" in the search bar, and press Enter. In the Control Panel, navigate to Programs > Programs and Features > Turn Windows Features On or Off. Then, check the “Internet Information Services” box and click “OK.” After that, restart your computer, and you'll find the inetpub folder in your Windows installation drive.

However, enabling the IIS service also creates additional folders such as temp, history, log, and more on your computer. These folders are unnecessary unless you are a developer intending to host websites or apps on your machine.
Therefore, it is better to restore the inetpub folder using the PowerShell script provided by Microsoft. Running this script does not enable the IIS service, which means you'll not have to deal with all the extra subfolders that the service creates automatically.
Since you need to change folder ACLs (Access Control Lists) and install modules, launch Windows PowerShell with elevated permissions. Then, type the following command and press Enter.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Next, execute this command:
Install-Script -Name Set-InetpubFolderAcl -Force
If PowerShell prompts you to install the NuGet provider, type Y and press Enter. After that, run the previous command again.

Now, to create the inetpub folder, run this command:
Set-InetpubFolderAcl

If PowerShell displays an error message stating, “Command Not Found,” execute the following command:
& "C:\Program Files\WindowsPowerShell\Scripts\Set-InetpubFolderAcl.ps1"
That’s it. After running the above commands, you’ll find the inetpub folder created in your Windows installation drive.

5 Easy Methods to Download Files Using PowerShell
Grab files fast with PowerShell—no browser needed.
That was all about the inetpub folder, why you should not delete it, and what to do if you have already deleted it. Frankly, Microsoft could have handled the folder better, considering its importance. They could have at least set the folder’s attribute to Hidden. This way, fewer people would have come across this folder, which would have ultimately reduced the number of users who deleted it.