Skip to contentGo to the directory tree
  1. C:
  2. inetpub
FolderRisk: Do not touch

inetpub C:\inetpub

IIS root folder (sites, logs). The April 2025 updates also create it without IIS, and Microsoft says not to delete it.

Updated on By AltF4 Formation

What it’s for

inetpub is the default folder for Internet Information Services (IIS). When IIS is installed, the default web site configuration is created in \Inetpub\Wwwroot and logs go to inetpub\logs\LogFiles. It therefore exists on client editions where the IIS feature is enabled, as well as on Windows Server with the Web Server role.

On a machine without IIS it has a different origin. Since the April 8, 2025 update, Windows creates a %systemdrive%\inetpub folder as part of a protection tied to the CVE-2025-21204 vulnerability. Microsoft states it must not be deleted, whether or not IIS is enabled, and that it requires no action from administrators or end users.

What it contains

  • With IIS: wwwroot (default site content), logs (site logs) and, depending on the installed components, custerr, history, temp or ftproot.
  • Without IIS, since the April 2025 update (reported on Windows 11 24H2 and Windows Server 2025): a folder that is usually empty, protected by system permissions.

Risks and best practices

  • Leave it in place even when empty: deleting it undoes the protection added by the fix. Do not replace its permissions with those of an ordinary folder either.
  • If IIS is installed, relocate the site roots or the logs to another volume from the IIS configuration instead.
  • Logs under logs\LogFiles can take a lot of space, so schedule purging or archiving.
  • If the folder was deleted by mistake, reinstall the relevant security update or recreate it as administrator, then check its permissions.

Useful commands

Fenêtre de terminal
# Folder existence, attributes and owner
Get-Item "$env:SystemDrive\inetpub" -Force | Select-Object FullName, Attributes, CreationTime
(Get-Acl "$env:SystemDrive\inetpub").Owner
# Contents (empty if IIS is not installed)
Get-ChildItem "$env:SystemDrive\inetpub" -Force
# Is IIS installed? Windows client (as administrator), then Windows Server
Get-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole | Select-Object FeatureName, State
Get-WindowsFeature Web-Server

Folder contents

Report a mistake