Does the script work for you if you put the line in a Try/Catch block?
Try {
Set-ExecutionPolicy -ExecutionPolicy 'ByPass' -Scope 'Process' -Force -ErrorAction 'Stop'
}
Catch {}