Windows Power Shell无法识别任何内容

问题描述

我正在开始尝试使我的机器运行WSL 2的过程,我首先按照Microsoft要求您运行的教程的第一步进行操作:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

这产生了以下错误

dism.exe : The term 'dism.exe' 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
+ dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsy ...
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (dism.exe:String) [],CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

这种问题对我来说并不陌生,一个星期前,我试图运行ssh,与此相关的是同样的错误,实际上,除了基本的cd或ls命令外,它似乎还导致了其他问题。同样的错误。为什么我的电源壳无法识别任何东西?

我正在运行Windows 10 Home,但已尝试以管理员身份运行而不是。我尝试在基本命令行和Windows Power Shell中运行。接下来我该怎么办?

编辑:运行带有注释的路径命令并获得结果

C:\Users\Nathaniel>echo [%path:;=]&echo.[%]
[C:\Program Files (x86)\Razer Chroma SDK\bin]
[C:\Program Files\Razer Chroma SDK\bin]
[C:\Program Files (x86)\Razer\Chromabroadcast\bin]
[C:\Program Files\Razer\Chromabroadcast\bin]
[C:\Program Files (x86)\Common Files\Oracle\Java\javapath]
[C:\Program Files\Java\jre1.8.0_181\bin]
[C:\Program Files\Git\cmd]
[D:\Prolog\swipl\bin]
[C:\ProgramData\chocolatey\bin]
[C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps]
[D:\Putty\]
[C:\Users\Nathaniel\AppData\Local\Microsoft\WindowsApps]
[C:\Users\Nathaniel\AppData\Local\GitHubDesktop\bin]
[C:\Users\Nathaniel\AppData\Local\Microsoft\WindowsApps]
[D:\Visual Studio Code\Microsoft VS Code\bin]
[D:\Anaconda]
[]
[D:\docker toolBox\Docker ToolBox]

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)