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
I am remoted into another computer with Enter-PSSession. I hit F5 to run a .ps1 with any code and it is trying to run on the local machine and/or not running correctly. Getting error:
C:\Users\XXXXX\AppData\Local\Temp\PSES-25588\RemoteFiles\609289779\CORE\scratch.ps1 : The term
'C:\Users\XXXXX\AppData\Local\Temp\PSES-25588\RemoteFiles\609289779\CORE\scratch.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:2 char:1
+ C:\Users\XXXXX\AppData\Local\Temp\PSES-25588\RemoteFiles\609289779 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\KTheis...ORE\scratch.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I have tried reinstalling the extension, reinstalling VSCode, and using the preview version of the extension.
This functionality works when I reproduce in Powershell ISE
PowerShell Version
(The following is from the integrated terminal, I am remoted into the "CORE" machine)[CORE]: PS C:\Users\XXXX\Documents> $PSVersionTable Name Value---- -----PSVersion 5.1.17763.316PSEdition DesktopPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}BuildVersion 10.0.17763.316CLRVersion 4.0.30319.42000WSManStackVersion 3.0PSRemotingProtocolVersion 2.3SerializationVersion 1.1.0.1[CORE]: PS C:\Users\hctech\Documents>
Prerequisites
Summary
I am remoted into another computer with Enter-PSSession. I hit F5 to run a .ps1 with any code and it is trying to run on the local machine and/or not running correctly. Getting error:
I have tried reinstalling the extension, reinstalling VSCode, and using the preview version of the extension.
This functionality works when I reproduce in Powershell ISE
PowerShell Version
Visual Studio Code Version
1.84.2
Extension Version
v2023.11.0
Steps to Reproduce
Remote into computer:
$so = New-PSSessionOption -SkipCACheck -SkipCNCheck
enter-pssession -ComputerName "CORE" -Credential:'hctech' -UseSSL -SessionOption $so
Then run any code with F5 to get the error.
*** I CAN run the code fine by using F8 running each line independently ***
Visuals
No response
Logs
No response
The text was updated successfully, but these errors were encountered: