Maybe this will be useful
<#Get list of files into $fileNames where $prefix is file name wildcard, like this "history_m1*.bak", $interval - time interval in days #>
$fileNames = $(Get-ChildItem -Path $sourceFolder -File | Where-Object {(New-Timespan $.LastWriteTime) -ge (New-Timespan -days -$interval) -and $.name -like $prefix})
<# zip $filenames with 7zip where $7zip is path to 7zip #>
&$7zip a -tzip $archiveName @($fileNames.ForEach({$_.Name}))