Prevent IIS installation
Supported on: Windows Server 2003 only
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\Software\Policies\Microsoft\Windows NT\IIS |
|---|---|
| Value name | PreventIISInstall |
| Enabled writes | 1 (REG_DWORD) |
| Disabled writes | 0 (REG_DWORD) |
What it does (vendor explanation)
"This policy setting prevents installation of Internet Information Services (IIS) on this computer. If you enable this policy setting, Internet Information Services (IIS) cannot be installed, and you will not be able to install Windows components or applications that require IIS. Users installing Windows components or applications that require IIS might not receive a warning that IIS cannot be installed because of this Group Policy setting. Enabling this setting will not have any effect on IIS if IIS is already installed on the computer. If you disable or do not configure this policy setting, IIS can be installed, as well as all the programs and applications that require IIS to run."
Group Policy path: Computer Configuration > Administrative Templates > Windows Components > Internet Information Services > Prevent IIS installation
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\IIS' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\IIS' -Name 'PreventIISInstall' -Value 1 -PropertyType DWord -ForceGroup Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".