Dear Abivanth R
Good day, and thank you for posting your question in the Microsoft Q&A forum.
I commend the thoughtful design of your backend logic, it demonstrates a clear understanding of the platform's capabilities.
Based on the details you've provided, it’s evident you're seeking an optimal approach within SharePoint to initiate a PowerShell script that gathers comprehensive site data and delivers it to users via email.
However, as forum moderators, we do not have access to backend systems, which makes this kind of task particularly challenging, especially with the level of hard-coding involved.
For more advanced and tailored support, I highly recommend reaching out directly to https://techcommunity.microsoft.com/. You can get more professional help, there will be very professional people to tell you about the steps on how to realize this function.
We hope this information is helpful and sincerely appreciate your understanding. Please let us know if there’s anything further we can do to support you
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.