Adding arguments to script from powershell with Unblock-File -Path Start -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File RRS feed

  • Question

  • Hi, normally from command I would type:

    Powershell -executionpolicy bypass -file set-ExecutionPolicy unrestricted ; C:\mydir\myscript.ps1 "#myinput1`r`n#myinput2"

    To get rid of registry and execution permissions.

    However when I'm trying to run a script from powershell itself, there is no need to type 'powershell', so I dont know how to get at the parameters "-executionpolicy bypass" and "set-ExecutionPolicy unrestricted".  How would I add these parameters to powershell, from inside powershell like:

    C:\mydir\myscript.ps1 "#mydata`r`n#mydata2`r`n" (and executionpolicy bypass and set-executionpolicy unrestricted)

    many thanks

    Saturday, September 8, 2012 6:53 PM


  • This is a forum dedicated to MS Project. Pls try the forum at to find the best place to post your question.


    Saturday, September 8, 2012 8:43 PM