We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dc42cb commit 506e45bCopy full SHA for 506e45b
WindowsDiskCleanup/Public/Remove-IISLog.ps1
@@ -0,0 +1,17 @@
1
+function Remove-IISLog {
2
+ [CmdletBinding()]
3
+ param(
4
+ [Parameter(Mandatory = $true)]
5
+ [int]$Days,
6
+
7
+ [string]$LogFilesFolder = "$env:SystemDrive\inetpub\logs\LogFiles",
8
9
+ [switch]$DryRun
10
+ )
11
12
+ process {
13
+ if (Test-Path $LogFilesFolder) {
14
+ Get-ChildItem $LogFilesFolder -Recurse -Filter *.log | Remove-OldFile -Days $Days -DryRun:$DryRun
15
+ }
16
17
+}
0 commit comments