Hi JOSROL,
Unfortunately, PowerShell is not available for SharePoint Online 2010 for the time being, and code in any language is outside the scope of our support. However, maybe some community members who have more experiences on such problems can come up with some methods. Thanks for your understanding.
Best regards,
Nancy Xie