{"id":38285,"date":"2025-06-07T01:10:36","date_gmt":"2025-06-06T23:10:36","guid":{"rendered":"http:\/\/159.69.82.204\/win\/?p=38285"},"modified":"2025-06-07T01:15:49","modified_gmt":"2025-06-06T23:15:49","slug":"microsoft-publishes-script-to-recreate-inetpub","status":"publish","type":"post","link":"https:\/\/borncity.com\/win\/2025\/06\/07\/microsoft-publishes-script-to-recreate-inetpub\/","title":{"rendered":"Microsoft publishes script to recreate inetpub"},"content":{"rendered":"<p><img decoding=\"async\" style=\"margin: 0px 10px 0px 0px; display: inline; float: left;\" title=\"Windows\" src=\"https:\/\/www.borncity.com\/blog\/wp-content\/uploads\/2021\/04\/Windows-klein.jpg\" alt=\"Windows\" width=\"200\" align=\"left\" \/>[<a href=\"https:\/\/www.borncity.com\/blog\/2025\/06\/07\/microsoft-veroeffentlicht-script-um-inetpub-neu-anzulegen\/\" target=\"_blank\" rel=\"noopener\">German<\/a>]On April 2025 Patchday, there was confusion under Windows 10\/11 about a folder \"inetpub\" that had been created. Some users deleted this folder, although Microsoft requires it. Microsoft has now released a \"repair\" script that restores this folder on the Windows system partition.<\/p>\n<p><!--more--><\/p>\n<h2>What is inetpub all about?<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vg05.met.vgwort.de\/na\/2cf05b2f05c341cea30bb1a53755da54\" alt=\"\" width=\"1\" height=\"1\" \/>After the April 2025 patch day (April 8, 2025), there was an increase in complaints from Windows users who suddenly saw an \"inetpub\" folder created on their Windows drive by the installed update. The April 2025 updates for Windows 10 (2019 and 22H2) and Windows 11 (23H2 and 24H2) were responsible.<\/p>\n<p>The empty \"inetpub\" folder was created on the drive for security reasons to mitigate the vulnerability <a href=\"https:\/\/msrc.microsoft.com\/update-guide\/vulnerability\/CVE-2025-21204\" target=\"_blank\" rel=\"noopener\">CVE-2025-21204<\/a> exploited by the Lumma malware. Microsoft wrote in the FAQ on the vulnerability that the new folder <em>%systemdrive%\\inetpub<\/em> created on the device by the updates should not be deleted. This applies regardless of whether Internet Information Services (IIS) is active on the target device. This behavior is part of the changes that increase protection and did not require any action from IT administrators or end users. I reported on this in the article <a href=\"https:\/\/borncity.com\/win\/2025\/04\/11\/windows-10-11-april-2025-updates-create-inetpub-folder\/\">Windows 10\/11: April 2025 updates create \"inetpub\" folder<\/a>.<\/p>\n<h2>Script for creating the folder<\/h2>\n<p>Unfortunately, after reports appeared on the Internet, many users deleted this folder manually. For this reason, Microsoft has published a PowerShell script with which the folder can be created again.<\/p>\n<p><a href=\"https:\/\/www.powershellgallery.com\/packages\/Set-InetpubFolderAcl\/1.0\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i.postimg.cc\/0jZJnLG0\/image.png\" alt=\"PowerShell Gallerie\" width=\"640\" height=\"504\" \/><\/a><\/p>\n<p>The script <em>Set-InetpubFilderAcl.ps<\/em> is available for download in the PowerShell Gallery at <a href=\"https:\/\/www.powershellgallery.com\/packages\/Set-InetpubFolderAcl\/1.0\" target=\"_blank\" rel=\"noopener\">this URL<\/a>. This script must be executed with administrative privileges using the following command in the PowerShell console:<\/p>\n<pre>Install-Script -Name Set-InetpubFolderAcl<\/pre>\n<p>The script checks whether the inetpub directory exists. If the <em>inetpub<\/em> directory does not exist, it is created and the standard IIS permissions are applied to the directory.<\/p>\n<p>If an empty folder exists, the script sets the default IIS permissions for the <em>inetpub<\/em> directory. If the <em>inetpub<\/em> directory exists and contains only the <em>DeviceHealthAttestation<\/em> subdirectory, the default IIS permissions are applied to both directories.<\/p>\n<p>If the <em>inetpub<\/em> directory exists and contains other subdirectories, the script is terminated without making any changes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[German]On April 2025 Patchday, there was confusion under Windows 10\/11 about a folder \"inetpub\" that had been created. Some users deleted this folder, although Microsoft requires it. Microsoft has now released a \"repair\" script that restores this folder on the &hellip; <a href=\"https:\/\/borncity.com\/win\/2025\/06\/07\/microsoft-publishes-script-to-recreate-inetpub\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[399,194],"class_list":["post-38285","post","type-post","status-publish","format-standard","hentry","category-windows","tag-fix","tag-windows"],"_links":{"self":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/38285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/comments?post=38285"}],"version-history":[{"count":3,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/38285\/revisions"}],"predecessor-version":[{"id":38288,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/38285\/revisions\/38288"}],"wp:attachment":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/media?parent=38285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/categories?post=38285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/tags?post=38285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}