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.
REFERENCE: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_run_with_powershell#:\x7e:text=In%20File%20Explorer%20(or%20Windows,script%2C%20and%20closes%20the%20session
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.