When Microsoft released the April 2025 security updates for Windows, users and administrators started to notice that the update created an empty folder called inetpub on the Windows drive.
Microsoft did not reveal any information about the mysterious folder in first place. This folder was linked to Internet Information Services in the past, but it was created even on systems that never had the feature installed.
It took a few days before Microsoft revealed why it created the folder. According to Microsoft, it was for increased protections. Users should not delete the folder under any circumstances.
Problem was, many did already as Microsoft did not mention any of that in the first days after releasing the update.
A new PowerShell script is now available that will recreate the inetpub folder along with all of its permissions.
Just run Install-Script -Name Set-InetpubFolderAcl in an elevated PowerShell terminal window. It has the following effect:
- If inetpub directory does not exist, it gets created and default IIS permissions are applied to the directory.
- If an empty inetpub directory exists, the default IIS permissions are applied to the directory.
- If inetpub directory exists and only contains the sub-directory DeviceHealthAttestation, default IIS permissions are applied to both directories.
- If inetpub directory exists and contains any other sub-directories, the script exits without making any changes.
So, if you do not have the inetpub folder anymore, you may run the script to restore it. (via Deskmodder)
The script contains text like IE=Edge and This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use.
HAH! Ain’t gonna happen. Inetpub stays gone forever on my computers.
“Microsoft did not reveal any information about the mysterious folder [inetpub] in first place.”
In France we qualify the Army as “La grande muette” (“The grand mute”) and obviously this applies to Microsoft. Had the company communicated on the about of this mysterious ‘inet’ folder that they would have saved time for everyone. Being disconnected from users is not specific to Microsoft, even if they excel in this opacity, but relevant of many major companies in proportion of their fatness : 1- a deliberate policy, and/or 2- a PR division insufficiently managed to handle a disproportionate number of customers : you’ve got a wide audience then manage communication consequently, which requires money they just don’t want to inject.
This appears not to be a secuity update, but a telemetry, data harvest update.
Reading the comments–then ignore MS and the general advice. Delete the folder; or leave it deleted; or re-create it. It’s such a non-issue. If someone has problems with MS Windows and communication, perceived telemetry, or extreme paranoia, then he/she shouldn’t be using Windows. Simple. Go to another OS.
Martin’s article and link isn’t the only way to discover the PS Script. Wondering the % of users who even know what folder is referred to. What % of users deleted the folder; what % would know how to run the script as admin.
Duck Assist–search term = inetpub ps script; user requested Assist; answer–
“To restore the “inetpub” folder on Windows, you can use a PowerShell script provided by Microsoft. Run PowerShell as an administrator and execute the command Install-Script -Name Set-InetpubFolderAcl to recreate the folder with the correct permissions.
Half Dome climb is in 33 days; which route?