I am trying to execut a script from shared folder that I trust:
powershell -file "\\server\scripts\my.ps1"
But get security warning, and have to press 'R'
Security Warning Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your computer. Do you want to run \server\scripts\my.ps1? [D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): d
Can I ignore this warning? Desired pseudo code is:
powershell -IGNORE_SECURITY_WARNING -file "\\server\scripts\my.ps1"