Your Windows PC might be at risk if you deleted the "inetpub" folder, but there’s a fix

1 month ago 3

Though bugs creeping in with every Windows update isn’t new, a mysterious folder appearing on everyone’s PCs out of nowhere isn’t something that happens with every update. That’s precisely what happened with the Patch Tuesday update for April 2025. Windows users started spotting a strange "inetpub" folder on the drive where Windows 11 is installed (usually the C: drive) right after their PCs were updated.

Though the folder was empty and took up zero bytes on the system drive, a lot of Windows users were quick to delete it. While Microsoft claimed the mysterious folder is nothing to worry about, Beaumont said it could allow non-admin users to stop all future Windows security updates. Microsoft didn’t say much else about the folder since then other than updating its documenting and said that the "inetpub" folder was created as part of a security patch for CVE-2025-21204. Though the tech-giant didn't explicity tell users not to delete it, it's now saying you need to bring it ASAP if you already deleted it.

A computer running Windows 11 and displaying File Explorer

Related

The ultimate guide to File Explorer on Windows 11

File Explorer is one of the most essential tools in Windows 11, but you may not know everything about it. Let's take a closer look.

You can run a PowerShell script to bring the folder back

As reported by Windows Latest, Microsoft has made a statement saying that you're not supposed to delete the "inetpub" folder, and if you've already deleted it, you need to bring it back.

Microsoft noted that the security flaw this mysterious folder fixes is caused by an improper link resolution issue, meaning that on unpatched devices (i.e. those that don't have the folder), Windows Update might follow symbolic links in a way that allows local attackers to trick the system into accessing or modifying files and folders.

The "inetpub" folder is related to a Windows feature called Internet Information Services (IIS). Though one needs to manually enable the feature, the "inetpub" folder was automatically installed on everyone’s PC, whether the IIS feature was enabled or not.

Since Microsoft advised against removing the folder, you could re-enable it by turning on Internet Information Services, which you can find in the Turn Windows Features on or off panel.

Though that works, most users aren't particularly keen on enabling the IIS feature, since it also creates additional folders that the average user doesn’t need. Windows Latest has now spotted a new PowerShell script that can recreate the folder without needing to enable IIS or deal with even more folders. To do so, run PowerShell as Administrator and copy and paste the following command to allow signed scripts and modules:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Then, copy and paste the command below to download the script:

Install-Script -Name Set-InetpubFolderAcl -Force

You might be prompted to install the NuGet Provider if it isn't already installed. Simply respond with Y to install it, and then run the above script again.

Finally, run this command to apply the fix:

Set-InetpubFolderAcl

If that doesn’t work, and you see an error that the command can’t be found, run it using the full path instead:

& "C:\Program Files\WindowsPowerShell\Scripts\Set-InetpubFolderAcl.ps1"

Once you've run the script above (or enabled IIS), the folder will be recreated!

Read Entire Article