Skip to content

Instantly share code, notes, and snippets.

@OSDTips
Last active November 23, 2015 22:10
Show Gist options
  • Save OSDTips/74f941be257d234023e2 to your computer and use it in GitHub Desktop.
Save OSDTips/74f941be257d234023e2 to your computer and use it in GitHub Desktop.
# Set-ExecutionPolicy without confirmation
$shell = New-Object -ComObject Wscript.Shell
Set-ExecutionPolicy Unrestricted | Echo $shell.sendkeys("Y`r`n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment