Executable scripts - Make scripts executable when renamed cmd
2 min read
Make a script self-elevating
Make a PowerShell script a standalone executable script by
pasting the following snippets at the beginning of a script and by
adding .bat to the file extension like script.ps1.bat
Script cannot be started relatively like modules\script.ps1.bat
This bypasses the Execution Policy for PowerShell scripts.
Make script executable
Make script executable and persistent
Make script executable and self-elevating
Make script executable, self-elevating and persistent