Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query.
I have linked an article below that may help solve your issue. Here is what the article has to say:
In File Explorer (or Windows Explorer), right-click the script file name and then select "Run with PowerShell". The "Run with PowerShell" functionality launches a PowerShell session with the execution policy Bypass, executes the script, and then exits the session.
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.