That would be possible, but a DateTime object in PowerShell has other methods.
You could do
$start= (Get-Date).AddDays(-10)
The test against the limit for the CPU and memory is done in this line
if($cpuAvg-gt$limit-and$memAvg-gt$limit){
If you only want to test the memory against the limit, you change that line like this
if($memAvg-gt$limit){