C:\.F4, [ALT] + [D], or click in the address bar.PowerShell into the address bar.[ENTER]A Powershell Window opens with the current directory C:\
Windows Explorer navigates to [IO.Path]::GetDirectoryName($profile).
Name Value
---- -----
PSVersion 6.2.1
PSEdition Core
GitCommitId 6.2.1
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Hi @lennybacon The binary name for PowerShell 6 is actually "pwsh" not "powershell". Try typing that into explorer and see if it works. Thanks.
@bpayette Thank you for the hint. I edited the title to be more clear about where I see the issue.
Is the issue about Windows PowerShell or PowerShell Core? I see 6.2.1 in Environment data section.
@iSazonov this changes existing functionality indirectly by installing PowerShell Core.
Basically, if you _don't_ have PS Core installed, entering powershell in the address bar in File Explorer actually invokes powershell.exe as it's on %PATH%.
However, once you install PS Core, it creates the %HOME%\Documents\PowerShell folder. Attempting to invoke Windows PowerShell in the same way as before now defaults to opening this folder instead of invoking powershell.exe.
I don't think there's anything we can really do to fix this, though. Literally any creation of a similarly-named folder in a similar location will similarly break most things that could potentially be invoked this way.
If anything, this should be raised via Windows channels to see if there's anything that can / should be done on that end.
I can not repo.
Nice sleuthing, @vexx32.
File Explorer gives precedence to folders located directly in $HOME/Documents if you submit a mere _name_ rather than a path in the address bar - _unless_ you use the executable's filename extension explicitly (assuming you have no folders named *.exe).
Therefore, the - somewhat cumbersome - workaround is to _include the filename extension_; that is, submit powershell.exe instead of just powershell.
As an aside; anything that is neither recognized as a folder in $HOME/Documents nor as an executable in $env:PATH is apparently interpreted as a _URL_ and opens in the default browser.
I'm fine with the workaround entering ...exe!
This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.
Most helpful comment
Nice sleuthing, @vexx32.
File Explorer gives precedence to folders located directly in
$HOME/Documentsif you submit a mere _name_ rather than a path in the address bar - _unless_ you use the executable's filename extension explicitly (assuming you have no folders named*.exe).Therefore, the - somewhat cumbersome - workaround is to _include the filename extension_; that is, submit
powershell.exeinstead of justpowershell.As an aside; anything that is neither recognized as a folder in
$HOME/Documentsnor as an executable in$env:PATHis apparently interpreted as a _URL_ and opens in the default browser.