1) Install powershell core via the dotnet global tool utility:
dotnet tool install --global PowerShell
2) run the new powershell command with the "Working Directory" option/flag:
pwsh -WorkingDirectory ~
It is expected that this option works and the shell starts in the provided directory.
The following error is thrown
-WorkingDirectory : The term '-WorkingDirectory' 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
+ -WorkingDirectory ~
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (-WorkingDirectory:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Running install and pwsh command in:
Name Value
---- -----
PSVersion 5.1.18362.145
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Installed pwsh (installed as global tool):
Name Value
---- -----
PSVersion 6.2.2
PSEdition Core
GitCommitId 6.2.2
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Closing this as it is same as #10355
:tada:This issue was addressed in #10461, which has now been successfully released as v7.0.0-preview.4.:tada:
Handy links:
:tada:This issue was addressed in #10461, which has now been successfully released as v6.2.4.:tada:
Handy links:
Most helpful comment
:tada:This issue was addressed in #10461, which has now been successfully released as
v7.0.0-preview.4.:tada:Handy links: