Hi MKHULEKO THABISO NHLAMBO, thanks for raising your issue.
Currently there is no such official documentation or script available which explains how to delete Teams recording older than 2 years for everyone. To achieve your requirements, we recommend you give your feedback in Teams Feedback Portal.
According to this documentation, Meeting recordings and transcripts have a default expiration time of 120 days. On the expiration date, the recording is moved into the recycle bin and the expiration date field is cleared. If a user recovers a recording from the recycle bin, the meeting expiration setting doesn't delete it again. Usually, the recording is deleted within a day after the expiration date but in rare instances could take as long as five days. The file owner receives an email notification when the recording expires and is directed to the recycle bin if they want to recover the recording.
Additionally, if you want to set the expiration time using PowerShell, you can run the following command:
Set-CsTeamsMeetingPolicy -Identity <policy name> -NewMeetingRecordingExpirationDays <days>
Thanks,
Prasad Das
*************************************************************************
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.