By default, Notepad is used when double-clicking on a .ps1 PowerShell script. To get around this issue, create a new shortcut and use the following parameters. This method does not require the modification of the execution policy.
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\users\username\desktop\script.ps1"
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.