Skip to content

Commit

Permalink
Strictly match casing of Get-Website
Browse files Browse the repository at this point in the history
  • Loading branch information
SamErde committed Mar 15, 2024
1 parent 71ac96b commit 9d44268
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TheCleaners/Public/Clear-OldIISLogs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Clear-OldIISLogs {
# Use the WebAdministration module if it is available
if (Get-Module -Name 'WebAdministration' -ListAvailable) {
# Get the logfile directory for each web site
$WebSites = Get-WebSite
$WebSites = Get-Website
foreach ($site in $WebSites) {
$SiteLogFileDirectory = ("$($Site.logFile.directory)\W3SVC$($Site.id)").Replace( '%SystemDrive%',$env:SystemDrive )
Write-Information -MessageData "Removing old IIS log files from $($Site.name) at $SiteLogFileDirectory." -InformationAction Continue
Expand Down

0 comments on commit 9d44268

Please sign in to comment.