PowerShell Interactive Window not working as expected

Tool: Visual Studio
Version: 2022

I just installed PowerShell Tools for Visual Studio 2022 (with a 14 day trial Pro license) and have configured it to use PowerShell 7 (x64). My questions relate to the PowerShell Interactive Window:

  1. It doesn’t load my PowerShell Profile. When I open a PowerShell 7 window normally, it loads my profile. But when using the VS 2022 extension, it does not. I didn’t see a configuration option for this. I noticed a few differences. I can dot source my profile file but I’d really rather not have to do that.
$profile.CurrentUserAllHosts

# pwsh window           = %USERPROFILE%\Documents\PowerShell\profile.ps1
# ps interactive window = %USERPROFILE%\Documents\WindowsPowerShell\Profile.ps1
$Host.Name

# pwsh window           = ConsoleHost
# ps interactive window = ServerRemoteHost
  1. It doesn’t handle ANSI escape sequences. I even tried the following, but it made no difference (same result). What do I have to do for this to work?
$PSDefaultParameterValues['*:Encoding'] = 'utf8'
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
$PSVersionTable

e[32;1mName                           Valuee[0m
e[32;1m----                           -----e[0m
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
  1. When I type a command and intellisense is triggered, it forces me to click the mouse somewhere outside of the dropdown before I can execute the command as typed. If I hit ENTER or TAB, it will cause the highlighted item in the dropdown to be added to the typed command. If I hit ESCAPE, it will cause the entire typed command to be removed. Try the following command. There has to be a better way that doesn’t involve me having to click the mouse to close the intellisense dropdown, right?
ls env:

Hopefully there are some easy fixes here, or this product is basically not usable, which is disappointing because it looks like it would be really cool. Please let me know if I should open issues on the github page.

#2 is the worst part of this because of the ANSI “color” escape sequences.

I did verify that everything displays properly when I switch the extension to use the other Windows PowerShell options, e.g. Windows PowerShell (x64), just not with PowerShell 7 (x64). I exclusively use PowerShell 7, so this doesn’t help me, but hopefully it will help someone diagnose / troubleshoot the problem.

I’ll add another issue to the list:

  1. Switching the PowerShell Version between PowerShell 7 (x64) and the other Windows PowerShell versions causes VS 2022 to lock up (not responding) for quite a while and pops up a toast notification that it will contact Microsoft about the slow extension.

Has anyone actually tried using this extension with VS 2022 and PowerShell 7?

There’s virtually no documentation that can help with any of this (at least not that I could find). I’ve literally spent hours troubleshooting myself and trying to figure this out. Silver lining is that at least I didn’t spend any money on this and am only using a 14 day trial. :grinning:

Hi Kyle,

I’ve opened issues to track the problems you are having. I wanted to make sure to capture these so we can track properly. Sorry for the issues and we can always extend the trial license.

Hi Adam -

Thanks for opening those issues. I added details and screen capture gifs to a few of them.

I appreciate the pressure to ship a product and get it to market as soon as possible, but you still need to have Quality Assurance and testing. :slightly_smiling_face: It’s one thing if it’s an open source “as-is” product, but you’re charging people for it. Unless you can get these things fixed very quickly, might I suggest you modify your listing in the Visual Studio Marketplace with a PREVIEW suffix in the title and clearly call out that these things don’t work? That would hopefully keep others from sharing my experience.

You deserve to be compensated for your work - your product has a lot of very cool features! That being said, I find the PowerShell 7 restriction odd, as it has been out for almost 2 years. PowerShell 7 is PowerShell, while the older versions were always Windows PowerShell. Would you consider lifting the restriction on PowerShell 7?

Please let me know how I can help, because like I said, it’s a very cool product and I would like to use it.

Enjoy the holidays!

Hi Adam -

I got your note about fixing the issues and installed the new version. I have started using it and testing things out, but could use a bit more time. You mentioned extending the trial license…how does that work?

Thanks!

Kyle

Hello Kyle,

Sorry for the delay in our response, as I am working on catching up. Please reach out to us at Email Support - Ironman Software for extension requests, quotes and product orders. We will be happy to help out! Thank you from the Ironman Software Support Team.