$shell = New-Object -ComObject Wscript.ShellSet-ExecutionPolicy Unrestricted | echo $shell.sendkeys("Y`r`n")
That's just an exemple on how this method can be used.
I think it can be very useful in some situations.
Just use the force switch to suppress prompts:
Set-ExecutionPolicy Unrestricted -force
Yes. But yet it is a good method for any cmdlets or any prompt that do not have the -force switch.