You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I open VS Code my terminal opens automatically with 'powershell'. If I open an existing script or start a new PS file, a 2nd terminal opens up running 'PowerShell Integrated Console'. Now I have two terminals, and the new one has a RemoteSigned execution restriction. My profile.ps1 executes again, causing the line Set-ExecutionPolicy Bypass -Scope CurrentUser to throw an error. The 'PowerShell Integrated Console' terminal also does not retain previous command history or color coding.
My non-default powershell extensions settings are these:
I've been unable to find where the execution policy is getting changed to RemoteSigned but I'm wondering if these two default settings are the cause of the additional terminal:
This is a dupe of #1084. The latest release had an issue where the script file was tweaked after signing, rendering the signature hash invalid. There should be an update coming soon to resolve this issue.
BTW the PowerShell Integrated Console is similar to the ISE console where the debug session runs in that console. It can manipulated during debug and the debug state remains after the debug session finishes - just like in ISE.
@BristleBeard The second terminal is the "PowerShell Integrated Terminal" which is connected to the PowerShell extension's editing and debugging experience, you definitely want it to be open. The reason why you see 2 terminals open is because VS Code falsely remembers a terminal being open the last time it was closed and pre-emptively opens a terminal for powershell.exe when it starts back up, before the PowerShell extension has a chance to start.
Is the RemoteSigned execution policy an issue for you? Can you solve this issue by calling Set-ExecutionPolicy in the $profile of the PowerShell Integrated Terminal (it's different than the default PowerShell profile)?
System Details
$PSVersionTable
:PSVersion 5.1.16299.19
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.19
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
When I open VS Code my terminal opens automatically with 'powershell'. If I open an existing script or start a new PS file, a 2nd terminal opens up running 'PowerShell Integrated Console'. Now I have two terminals, and the new one has a RemoteSigned execution restriction. My
profile.ps1
executes again, causing the lineSet-ExecutionPolicy Bypass -Scope CurrentUser
to throw an error. The 'PowerShell Integrated Console' terminal also does not retain previous command history or color coding.My non-default powershell extensions settings are these:
I've been unable to find where the execution policy is getting changed to RemoteSigned but I'm wondering if these two default settings are the cause of the additional terminal:
Attached Screenshots
The text was updated successfully, but these errors were encountered: