Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
Issue #12 Fixed
Browse files Browse the repository at this point in the history
Close #12
  • Loading branch information
Apoc70 committed Jun 3, 2018
1 parent c2c5e15 commit b6c29dd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Purge-LogFiles.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE
RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
Version 2.2, 2018-03-13
Version 2.21, 2018-06-03
Ideas, comments and suggestions to [email protected]
Expand Down Expand Up @@ -59,6 +59,7 @@
2.13 Issue #7 fixed
2.14 Issue #9 fixed
2.2 Minor changes, but no fixes
2.21 Issue #12 fixed
.PARAMETER DaysToKeep
Number of days Exchange and IIS log files should be retained, default is 30 days
Expand Down Expand Up @@ -234,7 +235,8 @@ function Copy-LogFiles {

try {
# create zipped asrchive
Add-Type -AssemblyName 'System.IO.Compression.FileSystem'
# Add-Type -AssemblyName 'System.IO.Compression.FileSystem'
[Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem")
[IO.Compression.ZipFile]::CreateFromDirectory($ServerRepositoryLogsPath,$Archive)
}
catch {
Expand Down Expand Up @@ -399,7 +401,8 @@ If (Test-IsAdmin) {

# Lets count the steps for a nice progress bar
$i = 1
$max = $AllExchangeServers.Count * 2 # two actions to execute per server
# Issue #12, Using Mesaure-Object to ensure that we have a Count property
$max = ($AllExchangeServers | Measure-Object).Count * 2 # two actions to execute per server

# Prepare Output
$Output = '<html>
Expand Down

0 comments on commit b6c29dd

Please sign in to comment.