Modify script to filter temporary group access end time

I'm using this script to get the report for edsva-ScheduledLink-EndTime, however I want to filter which user having 10 day before the expiring the access. The idea is to send email notification to remind them that your access will be expiring in 10 days. Can someone help me to modify the script.

Add-PSSnapin Quest.ActiveRoles.ADManagement
$controls = @{}
$controls.Add("ScheduledLink-GetPending",1)
$controls.Add("ScheduledLink-GetStartEndTime",1)
Get-QADGroupMember -proxy -Identity Test_Wallpaper-User-TS-G -Control $controls -IncludedProperties edsva-ScheduledLink-StartTime,edsva-ScheduledLink-EndTime | select name, email, edsva-ScheduledLink-StartTime,edsva-ScheduledLink-EndTime