I published a PowerShell script to do just that a while ago, check it out: https://www.michev.info/blog/post/3018/remove-sharing-permissions-on-all-files-in-users-onedrive-for-business
If you just want to report on shared items, here's a more recent script: https://www.michev.info/blog/post/6154/report-on-externally-shared-files-via-the-graph-api