I want to add custom data retention to my site collection in this way:

* Documents must be deleted after 3 years old (default option)
* After 3 years, delete all versions except the latest and two previous versions

I'm guessing this policy isn't available by default and must be coded in PowerShell (?). Can someone guide me to the right direction. I'm not familiar with SharePoint or PowerShell (I do have some basic programming knowledge).