bleepingcomputer[.]com/news/microsoft/microsoft-shares-script-to-restore-inetpub-folder-you-shouldnt-delete/
Wednesday, June 5, 2025, Microsoft released a PowerShell script to recreate the C:\inetpub folder with the correct permissions, or just set the permissions if you simply created a inetpub folder to replace one that was deleted. The backstory is...
Earlier this year a Patch Tuesday update left an empty C:\inetpub folder behind. I, and likely many others, figured it was a bug, similar to the C:\$WinREAgent folder that Patch Tuesday updates leave behind in Win10. Several days later Microsoft sort of issued guidance that that folder should be left alone [I say *sort of* because it was not an announcement but a reply to questions from Bleeping Computer]. Based on a proof of concept exploit by Kevin Beaumont, *I think* Windows Update uses that folder as a sort of cache during the update process in an attempt to mitigate a security vulnerability in Windows Update itself. Not long afterward various Microsoft folks said that if you deleted the folder a later update would replace it, which turned out to be false. [If it was *THAT* important, since updates are supposed to be cumulative, logically you'd expect it to be recreated.] Others said that you could install Internet Information Services and then uninstall it to recreate the folder with its special permissions. Those like myself who deleted the folder and never bothered to do anything about it since have suffered no apparent ill effects.
That all said, running the PowerShell script is a very easy way to hedge your bets in case there really is something to this folder, rather than someone just covering their a** because they overlooked something when they created that Windows update.
Usually the easiest way to run the script is to right-click the Start Button, then select Terminal (Admin). If you don't see it when you right-click the Start Button you can search or look in the Start Menu for either Terminal or PowerShell, running whichever you choose as admin. In Terminal it'll either show Windows PowerShell or Microsoft Windows on the top line -- if it shows Microsoft Windows, click the down arrow on the Title Bar and select PowerShell. Now 1st copy/paste Install-Script -Name Set-InetpubFolderAcl
and press Enter. You may have to click Y for yes one or more times to give it permission. Next copy/paste C:\Program` Files\WindowsPowerShell\Scripts\Set-InetpubFolderAcl.ps1
and press Enter to run the script.