"test"
, Get-ExecutionPolicy -list
..
the only command before the start is Set-ExecutionPolicy Bypass -Scope Process
. whether i then do Set-ExecutionPolicy RemoteSigned -Scope Process
, the issue doesn't change .
i found out that it doesn't happen in some cases
Get-ExecutionPolicy -list
provides no console output$v = Get-ExecutionPolicy if ($v -eq "Bypass") { Get-ExecutionPolicy -list } read-host -prompt "Press Enter to continue..."
Get-ExecutionPolicy -list
provides the output, kind ofGet-Item -Path Env:* $v = Get-ExecutionPolicy if ($v -eq "Bypass") { Get-ExecutionPolicy -list } read-host -prompt "Press Enter to continue..."