import depuis ancien GitHub

This commit is contained in:
David Wuibaille
2025-10-31 08:38:13 +01:00
parent 6f3aeedc93
commit 6a2f2de58e
745 changed files with 178444 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# Purge IIS Logs (PowerShell)
Purge old IIS log files to prevent the C: drive from filling up (IIS logs are stored by default under `%SystemDrive%\inetpub\logs\LogFiles`). :contentReference[oaicite:0]{index=0}
## Usage
Edit these variables :
```powershell
$LogPath
$maxDaystoKeep
$outputPath
```
Run from an elevated PowerShell prompt on the IIS server.
## Schedule (Task Scheduler)
![Overview](readme.png)
Run weekly as SYSTEM (example: Sundays 02:00):
```powershell
schtasks /Create /TN "IIS Logs Purge" ^
/TR "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\Scripts\Purge-IISLogs.ps1" ^
/SC WEEKLY /D SUN /ST 02:00 /RU SYSTEM /RL HIGHEST /F
```