Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Powershell Ruan As Administrator

$
0
0

If you want Set-ExecutionPolicy to work without prompting, add the -Force switch as well. (However, as has been noted, you can't rely on doing this from inside a script, since the execution policy would already have to be set up to allow scripts to run before that line was executed anyway.)

piping (echo "Y") to a command is an old Command Prompt trick which sometimes worked, but is never appropriate when working with PowerShell cmdlets or functions.


Viewing all articles
Browse latest Browse all 13067

Trending Articles