function Backup-AlkamiLogs { <# .SYNOPSIS Archives logs based off a cutoff date and then cleans the .NET temporary files #> [CmdletBinding()] Param( [Parameter(Mandatory=$false)] [Alias("LogPath")] [string]$logDirectory, [Parameter(Mandatory=$false)] [Alias("CutoffThreshold")] [int]$cutoffDays = 1, [Parameter(Mandatory=$false)] [Alias("SkipActive")] [switch]$skipActiveLogs ) if ([string]::IsNullOrEmpty($logDirectory)) { $logDirectory = (Get-OrbLogsPath) } Backup-ORBLogFiles -skipActiveLogs:$skipActiveLogs.IsPresent; Remove-OldArchivedLogFiles -ArchivePath (Join-Path $logDirectory "Archive") -CutoffThreshold $cutoffDays; }