Skip to content

Instantly share code, notes, and snippets.

@davops
Last active July 31, 2016 14:54
Show Gist options
  • Save davops/3321329a6e4172ac744dedf3ff8297ba to your computer and use it in GitHub Desktop.
Save davops/3321329a6e4172ac744dedf3ff8297ba to your computer and use it in GitHub Desktop.
Set Powershell's Execution Policy for a remote computer when it is currently set to "RemoteSigned"
$thisPsSession = New-PSSession SERVER1
Invoke-Command -Session $thisPsSession -ScriptBlock {
Set-ExecutionPolicy RemoteSigned
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment