Compile any .ps1 file into a .cmd file so that you can execute it with a double-click in Windows.
Install this package by pipx:
pipx install pwshcCompile your .ps1 file:
pwshc hello_world.ps1 -o hello_world.cmd
# -o is optionalYou can add auto elevate (run as admin) code to your .cmd file:
pwshc hello_world.ps1 --auto-elevate