execution policie

Welcome Forums General PowerShell Q&A execution policie

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
6 months, 2 weeks ago.

  • Author
    Posts
  • #101638

    Participant
    Points: 0
    Rank: Member

    Vous

    hi
    i use a powershell script with a scheduled task
    the script is in this folder

    C:\Program Files\xxx\etc\apps\xxx\bin\pingstatus.ps1
    i have to modify automatically the execution policy (Set-Executionpolicy -Scope CurrentUser -ExecutionPolicy UnRestricted) in the script
    i dont success to code this
    could you help me please???
    regards

  • #101652

    Participant
    Points: 269
    Helping Hand
    Rank: Contributor

    Please take a close look to the help for the Powershell.exe.

    Powershell.exe /?

    Especially to the parameter -ExecutionPolicy!!
    You cannote change the policy to be able to run scripts from inside a script. That's somewhat like the chicken and egg dilemma.

  • #101704

    Participant
    Points: 0
    Rank: Member

    OK THANKS

The topic ‘execution policie’ is closed to new replies.