add comment
parent
f2ddee5a96
commit
5fc69335b5
|
@ -19,6 +19,7 @@ function Invoke-LogRotation ($LogFile, $MaxLogFiles, $MaxLogSize) {
|
||||||
|
|
||||||
# construct name of archived log file
|
# construct name of archived log file
|
||||||
$newLogFileName = $logFileNameWithoutExtension + (Get-Date -Format 'yyyyMMddHHmmss').ToString() + $logFileNameExtension
|
$newLogFileName = $logFileNameWithoutExtension + (Get-Date -Format 'yyyyMMddHHmmss').ToString() + $logFileNameExtension
|
||||||
|
# rename old log file
|
||||||
Rename-Item -Path $LogFile -NewName $newLogFileName -Force -Confirm:$false
|
Rename-Item -Path $LogFile -NewName $newLogFileName -Force -Confirm:$false
|
||||||
|
|
||||||
# create new file
|
# create new file
|
||||||
|
|
Loading…
Reference in New Issue