Change Owner on Fileserver

Hello,
I hope you are all doing well. I have a question regarding ARM Solarwinds. We have encountered an issue on our file servers where many folders have unresolved SIDs due to the owners no longer existing. Could anyone provide guidance on how we can automate the process of changing the owner? Over the Webinterface at the RISK Interface Dashboard i can only change 1k Folders.
Any insights or suggestions would be greatly appreciated!
Thank you in advance for your help and expertise.
Best regards
Franky