Chipp.in Tech News and Reviews

Windows, Security & Privacy, Open Source and more

Menu
  • Home
  • Windows
  • Security & Privacy
  • Gaming
  • Guides
  • Windows 11 Book
  • Contact
  • RSS Feed
Menu

Microsoft publishes PowerShell script to recreate the Inetpub folder on Windows

Posted on June 6, 2025June 9, 2025 by Martin Brinkmann

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)

Tags:
Category: Windows

Post navigation

← Thunderbird Pro and Thundermail details emerge
Gog One-click Mod: easy installation of hand-picked mods →

4 thoughts on “Microsoft publishes PowerShell script to recreate the Inetpub folder on Windows”

  1. Bobo says:
    June 7, 2025 at 8:28 am

    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.

    Reply
  2. Tom Hawack says:
    June 7, 2025 at 11:02 am

    “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.

    Reply
  3. Robert says:
    June 7, 2025 at 11:37 am

    This appears not to be a secuity update, but a telemetry, data harvest update.

    Reply
  4. VioletMoon says:
    June 7, 2025 at 2:34 pm

    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?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • June 21, 2025 by Martin Brinkmann Windows 11 blocking Google Chrome? A security feature may be responsible
  • June 19, 2025 by Martin Brinkmann Gog's PC Games Summer Sale 2025 offers big discounts for thousands of games
  • June 18, 2025 by Martin Brinkmann Did Microsoft just announce PC-Xbox consoles?
  • June 17, 2025 by Martin Brinkmann Email Backup Software Vanderplanki 3 adds Microsoft Email support
  • June 16, 2025 by Martin Brinkmann WhatsApp: Ads in status, promoted channels, and channel subscriptions on their way

About

We talk, write and dream about Technology 24/7 here at Chipp.in. The site, created by Martin Brinkmann in 2023, focuses on well-researched tech news, reviews, guides, help and more.

Legal Notice

Our commitment

Many websites write about tech, but chipp.in is special in several ways. All of our guides are unique, and we will never just rehash news that you find elsewhere.

Read the About page for additional information on the site and its founder and author.

Support Us

We don't run advertisement on this site that tracks users. If you see ads, they are static links. Ads, including affiliate links, never affect our writing on this site.

Here is a link to our privacy policy

©2025 Chipp.in Tech News and Reviews