A collection of scripts to troubleshoot common IIS permissions and configuration issues on Windows.
| File | Description |
|---|---|
troubleshoot-iis.ps1 |
PowerShell script with colored output, error handling, and folder validation |
troubleshoot-iis.bat |
Batch script for Windows Command Prompt |
- Check IIS version — Queries the registry to display the installed IIS version.
- Take ownership — Recursively takes ownership of ScriptLog folders (
public/log,public/cache,public/themes,admin/plugins). - Grant Administrator full control — Applies
(OI)(CI)Fpermissions to Administrators. - Remove read-only attribute — Strips the read-only flag recursively.
- Grant AppPool modify access — Gives
(OI)(CI)Mpermissions toIIS AppPool\Scriptlog. - Restart IIS — Runs
iisresetto apply all changes.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\troubleshoot-iis.ps1troubleshoot-iis.batNote: Both scripts must be run as Administrator for
takeown,icacls, andiisresetto work.
- Windows Server / Windows 10+
- IIS installed with ScriptLog deployed at
C:\inetpub\wwwroot\scriptlog - Administrator privileges