
Per my knowledge and research, it's not available to use PowerShell script to get retention policy information in the SharePoint server.
As a workaround, you could use “Generate file plan report” to export retention policy information at list and library level.
Go to List or Library settings -> Generate file plan report -> Get the report.
Reference:
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.