Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 8, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 8, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 8, 2025

      AI is currently in its teenage years, battling raging hormones

      June 6, 2025

      Apple doesn’t need better AI as much as AI needs Apple to bring its A-game

      June 8, 2025

      DistroWatch Weekly, Issue 1125

      June 8, 2025

      Motion Highlights #9

      June 8, 2025

      The 2025 Wholesome Direct was chock-full of cozy casual games and aesthetic vibes

      June 8, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Online Scrap Portal Using PHP and MySQL

      June 8, 2025
      Recent

      Online Scrap Portal Using PHP and MySQL

      June 8, 2025

      Master Image Processing in Node.js Using Sharp for Fast Web Apps

      June 7, 2025

      mkocansey/bladewind

      June 7, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft built a bloat-free, optimized Windows 11 UI for handheld gaming

      June 8, 2025
      Recent

      Microsoft built a bloat-free, optimized Windows 11 UI for handheld gaming

      June 8, 2025

      DistroWatch Weekly, Issue 1125

      June 8, 2025

      Gradia is a Slick New Screenshot Annotation Tool for Linux

      June 8, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Operating Systems»Microsoft: Run PS script now if you deleted “inetpub” on Windows 11, Windows 10

    Microsoft: Run PS script now if you deleted “inetpub” on Windows 11, Windows 10

    June 6, 2025

    If you deleted the “inetpub” folder, which was created after Windows April 2025 Updates, you need to immediately bring it back, or your system will remain vulnerable to potential security threats. Microsoft told Windows Latest that the folder can be restored when you turn on the IIS service, or you can also use a new PowerShell script released on May 28.

    For those unaware, Windows 11 24H2 and other older versions of Windows, including Windows 10, created a folder called “inetpub” after the April 2025 Updates. This empty folder is typically associated with Internet Information Services (IIS), which is a native Windows service that allows developers to host websites or apps on Windows 11.

    Inetpub empty folder in Windows 11 KB5055523

    In case of Windows 11, Microsoft created the directory (C:inetpub) with KB5055523 or newer, but as you can see in the above screenshot, it doesn’t contain anything and the properties show the folder has zero bytes of data.

    C:inetpub folder

    When I checked the settings, IIS was also not turned on. Unfortunately, since Microsoft never acknowledged that “inetpub” is an intentional change in its release notes, some of us assumed that it’s a bug with the cumulative update and deleted the folder.

    Others deleted it because they were sceptical of Microsoft’s practices, especially creating a folder to patch a bug in the OS when the folder can be easily deleted, which makes us wonder what kind of patch is this?

    Microsoft later updated its documentation and told Windows Latest that “inetpub” folder is created as part of a security patch for CVE-2025-21204, and it doesn’t matter whether IIS is turned on or not. It’ll show up, and you’re not supposed to delete it, and if you deleted it, please bring it back, according to Microsoft.

    “The CVE-2025-21204 security flaw is caused by an improper link resolution issue before file access (‘link following’) in the Windows Update Stack which likely means that, on unpatched devices, Windows Update may follow symbolic links in a way that can let local attackers trick the system into accessing or modifying unintended files or folders,” Microsoft noted in a document.

    Previously, Microsoft told Windows Latest that the “inetpub” folder can be recreated with the same level of security by turning on Internet Information Services (IIS) from Control Panel > Programs > Programs & Features > Turn Windows features on or off.

    IIS Internet Information Service

    However, that’s something most people don’t want to do because IIS also creates additional folders, which are not required unless you’re a developer.

    Windows Latest today spotted that there’s a new PowerShell script that recreates the folder, and you don’t have to turn on IIS anymore.

    Microsoft published the script on May 28, and here’s how to use it.

    How to use PowerShell script to restore “inetpub” and patch CVE-2025-21204?

    1. Run PowerShell “as Administrator.” You can’t do that using a non-admin account because we’re trying to change folder ACLs and install modules. These require admin privileges.
      Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
    2. In PowerShell, first allow signed scripts and modules from Microsoft’s PowerShell Gallery with the following command: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
      Install-Script -Name Set-InetpubFolderAcl -Force
    3. To download the script from the PowerShell gallery, run the command: Install-Script -Name Set-InetpubFolderAcl -Force
      PowerShell NuGet provider
    4. In some cases (like mine), you’ll be asked to install “NuGet Provider” when it’s not present. Simply respond with “Y” to proceed, and run the above “install-script” again.
      Set-InetpubFolderAcl
    5. Run “Set-InetpubFolderAcl” to apply the fix and create the folder. But if you get an error that says “command not found” error, run it by full path:
      & "C:Program FilesWindowsPowerShellScriptsSet-InetpubFolderAcl.ps1"

    How does Install-Script command works?

    Windows Latest observed that the Install-Script pulls the script’s .ps1 file into your local PowerShell script folder (usually C:Program FilesWindowsPowerShellScripts), and the fourth step is required to actually to run the script.

    Should you really bother with “inetpub”? I’d recommend that you do. It should be present on your system. As per Microsoft, without the folder and its correct ACLs (Access Control Lists), you remain exposed to potential privilege escalation or unauthorised access.

    By running the Set-InetpubFolderAcl.ps1 script I highlighted, you’re recreating the folder and applying the proper IIS-style permissions so that the April 2025 Update fix for CVE-2025-21204 actually takes effect.

    Got questions? Let me know in the comments below.

    The post Microsoft: Run PS script now if you deleted “inetpub” on Windows 11, Windows 10 appeared first on Windows Latest

    Source: Read More 

    windows
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleHandling PostgreSQL Migrations in Node.js
    Next Article How global threat actors are weaponizing AI now, according to OpenAI

    Related Posts

    Operating Systems

    Microsoft built a bloat-free, optimized Windows 11 UI for handheld gaming

    June 8, 2025
    News & Updates

    DistroWatch Weekly, Issue 1125

    June 8, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    Arista Fixes Critical CloudVision Portal Vulnerability with CVSS 10 Score

    Security

    Docmost is a collaborative wiki and documentation software

    Linux

    Universal Design and Global Accessibility Awareness Day (GAAD)

    Development

    CVE-2025-47512 – Tainacan Path Traversal

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Development

    Countdown to the Kibo Connect Client Summit 2025

    April 16, 2025

    Our trusted Unified Commerce Platform partner, Kibo, is gearing up to host the Kibo Connect…

    CVE-2025-29746 – Koillection Cross Site Scripting (XSS)

    May 7, 2025

    The AI Mantra of All Time to Recite Now!

    April 17, 2025

    DMARC Record Explained: Strengthen Your Email Authentication And Deliverability Quickly

    June 6, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.