+ if($configBackupCompress) {
+ Compress-Archive -Path $target -DestinationPath "$target.zip"
+ Remove-Item -Path $target
+ }
+}
+function Invoke-FileRotation {
+ Param (
+ $Dir,
+ $MaxFiles,
+ [Parameter(Mandatory=$false)]
+ $Pattern,
+ [Parameter(Mandatory=$false)]
+ $LogFile
+ )
+
+ if($MaxFiles -le 0) {