Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use SSH with Powershell #4682

Closed
kuzi-moto opened this issue Feb 21, 2020 · 27 comments
Closed

Can't use SSH with Powershell #4682

kuzi-moto opened this issue Feb 21, 2020 · 27 comments
Labels
Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Resolution-Answered Related to questions that have been answered

Comments

@kuzi-moto
Copy link

Environment

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.18363.0 Microsoft Windows NT 10.0.18363.0

Windows Terminal version (if applicable): 0.9.433.0

Steps to reproduce

  1. Open Windows Terminal Preview
  2. Run ssh

Expected behavior

usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]host[:port]] [-L address]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] destination [command]

Actual behavior

ssh : The term 'ssh' 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:1 char:1
+ ssh
+ ~~~
    + CategoryInfo          : ObjectNotFound: (ssh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Additional Information

Something that's interesting, is that I can't even view the OpenSSH directory...

PS C:\Users\kuzi-moto> Get-Item "C:\Windows\System32\OpenSSH"
Get-Item : Cannot find path 'C:\Windows\System32\OpenSSH' because it does not exist.
At line:1 char:1
+ Get-Item "C:\Windows\System32\OpenSSH"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Windows\System32\OpenSSH:String) [Get-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand

But when using a normal PowerShell prompt, works just fine:

PS C:\Users\kuzi-moto> Get-Item "C:\Windows\System32\OpenSSH"


    Directory: C:\Windows\System32


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        3/19/2019   1:21 AM                OpenSSH
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Feb 21, 2020
@beviu
Copy link
Contributor

beviu commented Feb 21, 2020

windows settings > apps > apps & features > optional features > add a feature > openssh client

@kuzi-moto
Copy link
Author

windows settings > apps > apps & features > optional features > add a feature > openssh client

Already installed!

image

@zadjii-msft
Copy link
Member

This sounds a lot like x86/x64/System32/SysWOW trickery. @kuzi-moto do you know what architecture you're running on your PC?

This sounds a lot like how when I run Terminal from VS after building it, it can't find WSL on the path (because it's not 32-bit), but running it normally, WSL works fine.

Are you running something like:
C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe

or

C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe

@kuzi-moto
Copy link
Author

This sounds a lot like x86/x64/System32/SysWOW trickery. @kuzi-moto do you know what architecture you're running on your PC?

PS C:\Users\kuzi-moto> $ENV:PROCESSOR_ARCHITECTURE
AMD64

This sounds a lot like how when I run Terminal from VS after building it, it can't find WSL on the path (because it's not 32-bit), but running it normally, WSL works fine.

Are you running something like:
C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe

or

C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe

Looks like my standard PowerShell prompt runs from %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe. I opened the one from the SysWOW64 directory, and it is has the same issue with SSH as well.

@DHowett-MSFT
Copy link
Contributor

That's really unusual. From inside WT, can you also share $env:PATH?

@DHowett-MSFT DHowett-MSFT added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 21, 2020
@kuzi-moto
Copy link
Author

That's really unusual. From inside WT, can you also share $env:PATH?

PS C:\Users\kuzi-moto> $env:PATH
C:\Python38\Scripts\;C:\Python38\;C:\Python37\Scripts\;C:\Python37\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files\Symantec.cloud\PlatformAgent\;C:\tools\php73;C:\ProgramData\ComposerSetup\bin;C:\ProgramData\ngrok-stable-windows-amd64;C:\tools\php74;C:\Program Files\PuTTY\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Git\cmd;C:\Go\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Users\kuzi-moto\AppData\Local\Microsoft\WindowsApps;C:\Users\kuzi-moto\AppData\Local\Programs\Microsoft VS Code\bin;C:\tools\mysql\current\bin;C:\Users\kuzi-moto\AppData\Roaming\Composer\vendor\bin;C:\Users\kuzi-moto\AppData\Local\Box\Box Edit\;C:\Users\kuzi-moto\go\bin;C:\Users\kuzi-moto\AppData\Roaming\npm

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Feb 21, 2020
@DHowett-MSFT
Copy link
Contributor

C:\Windows\system32\openssh is definitely in there.

If you run it from WT as c:\windows\sysnative\openssh\ssh.exe, does it work? (key being sysnative)

@DHowett-MSFT DHowett-MSFT added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Feb 21, 2020
@kuzi-moto
Copy link
Author

C:\Windows\system32\openssh is definitely in there.

If you run it from WT as c:\windows\sysnative\openssh\ssh.exe, does it work? (key being sysnative)

Yes, that does appear to work.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Feb 24, 2020
@DHowett-MSFT DHowett-MSFT removed the Needs-Attention The core contributors need to come back around and look at this ASAP. label Feb 25, 2020
@DHowett-MSFT
Copy link
Contributor

DHowett-MSFT commented Feb 25, 2020

This is fascinating. Everything we're seeing from your system (through WT) is acting as though you're in WoW/using powershell x86 on an x64 machine/possibly on an ARM64 machine where it doesn't ship arm64 powershell by default.

Did you install Terminal from the store, or from our downloads page?

Can you share your profiles.json and the defaults.json from your terminal distribution?

Would you also mind sharing the output of Get-AppxPackage Microsoft.WindowsTerminal*?

Sorry for all the questions!

@DHowett-MSFT DHowett-MSFT added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 25, 2020
@kuzi-moto
Copy link
Author

kuzi-moto commented Feb 26, 2020

Did you install Terminal from the store, or from our downloads page?

I initially installed it via chocolatey a while ago. On seeing these issues I uninstalled it, then re-installed via the store.

Can you share your profiles.json and the defaults.json from your terminal distribution?

profiles.json

// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
    "$schema": "https://aka.ms/terminal-profiles-schema",

    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",

    "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles
        },
        "list":
        [
            {
                // Make changes here to the powershell.exe profile
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            },
            {
                // Make changes here to the cmd.exe profile
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "cmd",
                "commandline": "cmd.exe",
                "hidden": false
            },
            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "hidden": false,
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            }
        ]
    },

    // Add custom color schemes to this array
    "schemes": [],

    // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    "keybindings": []
}

defaults.json

// THIS IS AN AUTO-GENERATED FILE! Changes to this file will be ignored.
{
    "alwaysShowTabs": true,
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "initialCols": 120,
    "initialRows": 30,
    "requestedTheme": "system",
    "showTabsInTitlebar": true,
    "showTerminalTitleInTitlebar": true,
    "tabWidthMode": "equal",
    "snapToGridOnResize": false,
    "wordDelimiters": " /\\()\"'-.,:;<>~!@#$%^&*|+=[]{}~?\u2502",
    "confirmCloseAllTabs": true,

    "profiles":
    [
        {
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false,
            "startingDirectory": "%USERPROFILE%",
            "closeOnExit": "graceful",
            "colorScheme": "Campbell Powershell",
            "cursorColor": "#FFFFFF",
            "cursorShape": "bar",
            "fontFace": "Consolas",
            "fontSize": 12,
            "historySize": 9001,
            "icon": "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
            "padding": "8, 8, 8, 8",
            "snapOnInput": true,
            "useAcrylic": false
        },
        {
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",
            "hidden": false,
            "startingDirectory": "%USERPROFILE%",
            "closeOnExit": "graceful",
            "colorScheme": "Campbell",
            "cursorColor": "#FFFFFF",
            "cursorShape": "bar",
            "fontFace": "Consolas",
            "fontSize": 12,
            "historySize": 9001,
            "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
            "padding": "8, 8, 8, 8",
            "snapOnInput": true,
            "useAcrylic": false
        }
    ],
    "schemes":
    [
        {
            "name": "Campbell",
            "foreground": "#CCCCCC",
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "red": "#C50F1F",
            "green": "#13A10E",
            "yellow": "#C19C00",
            "blue": "#0037DA",
            "purple": "#881798",
            "cyan": "#3A96DD",
            "white": "#CCCCCC",
            "brightBlack": "#767676",
            "brightRed": "#E74856",
            "brightGreen": "#16C60C",
            "brightYellow": "#F9F1A5",
            "brightBlue": "#3B78FF",
            "brightPurple": "#B4009E",
            "brightCyan": "#61D6D6",
            "brightWhite": "#F2F2F2"
        },
        {
            "name": "Campbell Powershell",
            "foreground": "#CCCCCC",
            "background": "#012456",
            "black": "#0C0C0C",
            "red": "#C50F1F",
            "green": "#13A10E",
            "yellow": "#C19C00",
            "blue": "#0037DA",
            "purple": "#881798",
            "cyan": "#3A96DD",
            "white": "#CCCCCC",
            "brightBlack": "#767676",
            "brightRed": "#E74856",
            "brightGreen": "#16C60C",
            "brightYellow": "#F9F1A5",
            "brightBlue": "#3B78FF",
            "brightPurple": "#B4009E",
            "brightCyan": "#61D6D6",
            "brightWhite": "#F2F2F2"
        },
        {
            "name": "Vintage",
            "foreground": "#C0C0C0",
            "background": "#000000",
            "black": "#000000",
            "red": "#800000",
            "green": "#008000",
            "yellow": "#808000",
            "blue": "#000080",
            "purple": "#800080",
            "cyan": "#008080",
            "white": "#C0C0C0",
            "brightBlack": "#808080",
            "brightRed": "#FF0000",
            "brightGreen": "#00FF00",
            "brightYellow": "#FFFF00",
            "brightBlue": "#0000FF",
            "brightPurple": "#FF00FF",
            "brightCyan": "#00FFFF",
            "brightWhite": "#FFFFFF"
        },
        {
            "name": "One Half Dark",
            "foreground": "#DCDFE4",
            "background": "#282C34",
            "black": "#282C34",
            "red": "#E06C75",
            "green": "#98C379",
            "yellow": "#E5C07B",
            "blue": "#61AFEF",
            "purple": "#C678DD",
            "cyan": "#56B6C2",
            "white": "#DCDFE4",
            "brightBlack": "#5A6374",
            "brightRed": "#E06C75",
            "brightGreen": "#98C379",
            "brightYellow": "#E5C07B",
            "brightBlue": "#61AFEF",
            "brightPurple": "#C678DD",
            "brightCyan": "#56B6C2",
            "brightWhite": "#DCDFE4"
        },
        {
            "name": "One Half Light",
            "foreground": "#383A42",
            "background": "#FAFAFA",
            "black": "#383A42",
            "red": "#E45649",
            "green": "#50A14F",
            "yellow": "#C18301",
            "blue": "#0184BC",
            "purple": "#A626A4",
            "cyan": "#0997B3",
            "white": "#FAFAFA",
            "brightBlack": "#4F525D",
            "brightRed": "#DF6C75",
            "brightGreen": "#98C379",
            "brightYellow": "#E4C07A",
            "brightBlue": "#61AFEF",
            "brightPurple": "#C577DD",
            "brightCyan": "#56B5C1",
            "brightWhite": "#FFFFFF"
        },
        {
            "name": "Solarized Dark",
            "foreground": "#839496",
            "background": "#002B36",
            "black": "#073642",
            "red": "#DC322F",
            "green": "#859900",
            "yellow": "#B58900",
            "blue": "#268BD2",
            "purple": "#D33682",
            "cyan": "#2AA198",
            "white": "#EEE8D5",
            "brightBlack": "#002B36",
            "brightRed": "#CB4B16",
            "brightGreen": "#586E75",
            "brightYellow": "#657B83",
            "brightBlue": "#839496",
            "brightPurple": "#6C71C4",
            "brightCyan": "#93A1A1",
            "brightWhite": "#FDF6E3"
        },
        {
            "name": "Solarized Light",
            "foreground": "#657B83",
            "background": "#FDF6E3",
            "black": "#073642",
            "red": "#DC322F",
            "green": "#859900",
            "yellow": "#B58900",
            "blue": "#268BD2",
            "purple": "#D33682",
            "cyan": "#2AA198",
            "white": "#EEE8D5",
            "brightBlack": "#002B36",
            "brightRed": "#CB4B16",
            "brightGreen": "#586E75",
            "brightYellow": "#657B83",
            "brightBlue": "#839496",
            "brightPurple": "#6C71C4",
            "brightCyan": "#93A1A1",
            "brightWhite": "#FDF6E3"
        }
    ],
    "keybindings":
    [
        { "command": "closePane", "keys": [ "ctrl+shift+w" ] },
        { "command": "closeWindow", "keys": [ "alt+f4" ] },
        { "command": "copy", "keys": [ "ctrl+shift+c" ] },
        { "command": "copy", "keys": [ "ctrl+insert" ] },
        { "command": "decreaseFontSize", "keys": [ "ctrl+-" ] },
        { "command": "duplicateTab", "keys": [ "ctrl+shift+d" ] },
        { "command": "increaseFontSize", "keys": [ "ctrl+=" ] },
        { "command": { "action": "moveFocus", "direction": "down" }, "keys": [ "alt+down" ] },
        { "command": { "action": "moveFocus", "direction": "left" }, "keys": [ "alt+left" ] },
        { "command": { "action": "moveFocus", "direction": "right" }, "keys": [ "alt+right" ] },
        { "command": { "action": "moveFocus", "direction": "up" }, "keys": [ "alt+up" ] },
        { "command": "newTab", "keys": [ "ctrl+shift+t" ] },
        { "command": { "action": "newTab", "index": 0 }, "keys": ["ctrl+shift+1"] },
        { "command": { "action": "newTab", "index": 1 }, "keys": ["ctrl+shift+2"] },
        { "command": { "action": "newTab", "index": 2 }, "keys": ["ctrl+shift+3"] },
        { "command": { "action": "newTab", "index": 3 }, "keys": ["ctrl+shift+4"] },
        { "command": { "action": "newTab", "index": 4 }, "keys": ["ctrl+shift+5"] },
        { "command": { "action": "newTab", "index": 5 }, "keys": ["ctrl+shift+6"] },
        { "command": { "action": "newTab", "index": 6 }, "keys": ["ctrl+shift+7"] },
        { "command": { "action": "newTab", "index": 7 }, "keys": ["ctrl+shift+8"] },
        { "command": { "action": "newTab", "index": 8 }, "keys": ["ctrl+shift+9"] },
        { "command": "nextTab", "keys": [ "ctrl+tab" ] },
        { "command": "openNewTabDropdown", "keys": [ "ctrl+shift+space" ] },
        { "command": "openSettings", "keys": [ "ctrl+," ] },
        { "command": "paste", "keys": [ "ctrl+shift+v" ] },
        { "command": "paste", "keys": [ "shift+insert" ] },
        { "command": "prevTab", "keys": [ "ctrl+shift+tab" ] },
        { "command": "resetFontSize", "keys": ["ctrl+0"]},
        { "command": { "action": "resizePane", "direction": "down" }, "keys": [ "alt+shift+down" ] },
        { "command": { "action": "resizePane", "direction": "left" }, "keys": [ "alt+shift+left" ] },
        { "command": { "action": "resizePane", "direction": "right" }, "keys": [ "alt+shift+right" ] },
        { "command": { "action": "resizePane", "direction": "up" }, "keys": [ "alt+shift+up" ] },
        { "command": "scrollDown", "keys": [ "ctrl+shift+down" ] },
        { "command": "scrollDownPage", "keys": [ "ctrl+shift+pgdn" ] },
        { "command": "scrollUp", "keys": [ "ctrl+shift+up" ] },
        { "command": "scrollUpPage", "keys": [ "ctrl+shift+pgup" ] },
        { "command": { "action": "splitPane", "split": "horizontal"}, "keys": [ "alt+shift+-" ] },
        { "command": { "action": "splitPane", "split": "vertical"}, "keys": [ "alt+shift+plus" ] },
        { "command": { "action": "switchToTab", "index": 0 }, "keys": ["ctrl+alt+1"] },
        { "command": { "action": "switchToTab", "index": 1 }, "keys": ["ctrl+alt+2"] },
        { "command": { "action": "switchToTab", "index": 2 }, "keys": ["ctrl+alt+3"] },
        { "command": { "action": "switchToTab", "index": 3 }, "keys": ["ctrl+alt+4"] },
        { "command": { "action": "switchToTab", "index": 4 }, "keys": ["ctrl+alt+5"] },
        { "command": { "action": "switchToTab", "index": 5 }, "keys": ["ctrl+alt+6"] },
        { "command": { "action": "switchToTab", "index": 6 }, "keys": ["ctrl+alt+7"] },
        { "command": { "action": "switchToTab", "index": 7 }, "keys": ["ctrl+alt+8"] },
        { "command": { "action": "switchToTab", "index": 8 }, "keys": ["ctrl+alt+9"] },
        { "command": "find", "keys": [ "ctrl+shift+f" ] },
        { "command": "toggleFullscreen", "keys": [ "alt+enter" ] },
        { "command": "toggleFullscreen", "keys": [ "f11" ] }
    ]
}

Would you also mind sharing the output of Get-AppxPackage Microsoft.WindowsTerminal*?

PS C:\Users\kuzi-moto> Get-AppxPackage Microsoft.WindowsTerminal*


Name              : Microsoft.WindowsTerminal
Publisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture      : X64
ResourceId        :
Version           : 0.9.433.0
PackageFullName   : Microsoft.WindowsTerminal_0.9.433.0_x64__8wekyb3d8bbwe
InstallLocation   : C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.9.433.0_x64__8wekyb3d8bbwe
IsFramework       : False
PackageFamilyName : Microsoft.WindowsTerminal_8wekyb3d8bbwe
PublisherId       : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
NonRemovable      : False
Dependencies      : {Microsoft.VCLibs.140.00_14.0.27810.0_x64__8wekyb3d8bbwe,
                    Microsoft.VCLibs.140.00.UWPDesktop_14.0.27810.0_x64__8wekyb3d8bbwe}
IsPartiallyStaged : False
SignatureKind     : Store
Status            : Ok

Sorry for all the questions!

No problem!

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Feb 26, 2020
@DHowett-MSFT
Copy link
Contributor

So, I've been thinking about this for a while, and I just can't dig up a single idea as to why it's happening.

Would you mind running Process Monitor?

If you create a filter for Process name is powershell.exe Include (screenshot below), and then Event Class is File System Include, it'll be a pretty small trace.

filter

image

files only

image

ssh filter, possibly:

image

I'd love to see what powershell is doing when you try to run ssh!

When I run it, I get this:

image

it shows powershell searching for ssh in $PATH 😄

@DHowett-MSFT DHowett-MSFT added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Mar 24, 2020
@kuzi-moto
Copy link
Author

kuzi-moto commented Mar 24, 2020

I'm not sure what's wrong, but I get a bit over 2,000 events when running ssh with the suggested filters.

Here is a screenshot of the filters:
image

I have uploaded a spreadsheet of the results for your perusal: Logfile.xlsx

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Mar 24, 2020
@DHowett-MSFT
Copy link
Contributor

If you add this filter, it should cut down on the noise significantly:

image

@DHowett-MSFT DHowett-MSFT added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 26, 2020
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Mar 30, 2020
@ghost
Copy link

ghost commented Mar 30, 2020

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@kuzi-moto
Copy link
Author

when you launch a new powershell tab with WT, it should spit out some events.

Here you go: Logfile.xlsx

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Mar 31, 2020
@DHowett-MSFT
Copy link
Contributor

I've got really great and terrible news for you. You have a stray copy of powershell.exe, 32-bit, sitting in C:\Windows. That's not really a normal or expected location for PowerShell to live. . .

@DHowett-MSFT DHowett-MSFT added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Mar 31, 2020
@DHowett-MSFT
Copy link
Contributor

Closing as a question -- root caused to powershell living somewhere it shouldn't, still on $PATH. Fix by identifying why that powershell's there (and removing it) or changing the commandline of Windows PowerShell so that it points to the one living in System32\WindowsPowerShell\v1.0 😄

@DHowett-MSFT DHowett-MSFT added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 1, 2020
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Apr 1, 2020
@DHowett
Copy link
Member

DHowett commented Jun 26, 2020

Hey @kuzi-moto -- did you ever end up figuring out where that copy of PowerShell came from? 😄

DHowett added a commit that referenced this issue Jun 26, 2020
Occasionally, we get users with corrupt PATH environment variables: they
can't lauch PowerShell, because for some reason it's dropped off their
PATH. We also get users who have stray applications named
`powershell.exe` just lying around in random system directories.

We can combat both of these issues by simply hardcoding where we expect
PowerShell and CMD to live. %SystemRoot% was chosen over %WINDIR%
because apparently (according to Stack Overflow), SystemPath is
read-only and WINDIR isn't.

Refs #6039, #4390, #4228, #4682 (stray powershell.exe).
This may impact #6082 (as it might be another "stray file" incident).
@kuzi-moto
Copy link
Author

Hey @kuzi-moto -- did you ever end up figuring out where that copy of PowerShell came from? 😄

Actually I never did! Couldn't figure out how it got there, so I think I just deleted it and all was well.

@DHowett
Copy link
Member

DHowett commented Jun 26, 2020

Excellent.

I thought of you because of #6684 -- I can't believe it took me literally six months to think of this solution ;P

@kuzi-moto
Copy link
Author

Well, hindsight is always 20/20! I'm just glad I got it working, been happy using it this far.

ghost pushed a commit that referenced this issue Jun 26, 2020
Occasionally, we get users with corrupt PATH environment variables: they
can't lauch PowerShell, because for some reason it's dropped off their
PATH. We also get users who have stray applications named
`powershell.exe` just lying around in random system directories.

We can combat both of these issues by simply hardcoding where we expect
PowerShell and CMD to live. %SystemRoot% was chosen over %WINDIR%
because apparently (according to Stack Overflow), SystemPath is
read-only and WINDIR isn't.

Refs #6039, #4390, #4228 (powershell was not found)
Refs #4682, Fixes #6082 (stray powershell.exe)
DHowett added a commit that referenced this issue Jun 26, 2020
Occasionally, we get users with corrupt PATH environment variables: they
can't lauch PowerShell, because for some reason it's dropped off their
PATH. We also get users who have stray applications named
`powershell.exe` just lying around in random system directories.

We can combat both of these issues by simply hardcoding where we expect
PowerShell and CMD to live. %SystemRoot% was chosen over %WINDIR%
because apparently (according to Stack Overflow), SystemPath is
read-only and WINDIR isn't.

Refs #6039, #4390, #4228 (powershell was not found)
Refs #4682, Fixes #6082 (stray powershell.exe)

(cherry picked from commit 2fc1ef0)
DHowett added a commit that referenced this issue Jun 26, 2020
Occasionally, we get users with corrupt PATH environment variables: they
can't lauch PowerShell, because for some reason it's dropped off their
PATH. We also get users who have stray applications named
`powershell.exe` just lying around in random system directories.

We can combat both of these issues by simply hardcoding where we expect
PowerShell and CMD to live. %SystemRoot% was chosen over %WINDIR%
because apparently (according to Stack Overflow), SystemPath is
read-only and WINDIR isn't.

Refs #6039, #4390, #4228 (powershell was not found)
Refs #4682, Fixes #6082 (stray powershell.exe)

(cherry picked from commit 2fc1ef0)
@shalin51

This comment has been minimized.

@DHowett
Copy link
Member

DHowett commented Aug 17, 2020

Probably don't do that, just use the system's built-in SSH client once you figure out which architecture you're on.

@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

6 participants