Stuck on a machine that has a restrictive PowerShell execution policy that is set via Group Policy? Unfortunately you can’t just use Set-ExecutionPolicy to change the policy for the MachinePolicy scope.
But, if you can get to the HKLM hive (i.e. you’re a local admin), then you can very quickly wipe out any PowerShell policy settings. This will last until the GPOs are refreshed, but is still handy if you have a quick something to do…
Remove-Item HKLM:\Software\Policies\Microsoft\Windows\PowerShell
For more information, check out Vlad Catrinescu’s post which goes in to a bit more detail.