Just use this syntax:
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File \\local\folder1\folder2\folder3\scripts\Start-PowershellScript.ps1
First create a program with program wizard without this ugly command line, just select script name normally. After the program has been created, in properties panel put the command line.

Nenhum comentário:
Postar um comentário