我无意中删除了Windows 10后尝试在Windows PowerShell上重新安装Windows PowerShell。我试图升级到最新的PowerShell Core,并在使用新的Az模块删除AzureRM模块的说明中,删除了Windows 10上的Windows PowerShell。
我检查了此链接,以获取有关如何在Windows 10上安装Windows PowerShell的一些线索。似乎无法单独安装Windows PowerShell。所以我从这里安装了Windows Powershell Core 6.xx ,
编辑:
请注意:我无法在窗口10上安装WMF 5.1。
但是现在我在安装的应用程序中看到的是Powershell 6.XX,而不是Windows PowerShell(在我卸载它之前就已经存在)。
我在Windows 10上检查了Windows PowerShell的版本,发现安装了5.1。
因此,当我在“控制”面板中的“已安装的应用程序”下进行检查时,我看到了PowerShell6.XX。但是,当我在控制台上检查Windows Powershell版本时,它是5.1.xx?
我做错了什么或我想念什么?我有点困惑。
我无意中删除了Windows 10后尝试在Windows PowerShell上重新安装Windows PowerShell。
由于您运行的是Windows 10,因此实际上无法卸载PowerShell 5.1。Windows PowerShell 2.0 Engine
可以出于兼容性原因进行安装,而无需运行PowerShell 5.1。
我试图升级到最新的PowerShell Core,并在使用新的Az模块删除AzureRM模块的说明中,删除了Windows 10上的Windows PowerShell。
删除的是PowerShell Core
PowerShell 5.1的一个分支,它是独立安装的,并且与一起存在Windows PowerShell
。
但是现在我在安装的应用程序中看到的是Powershell 6.XX,而不是Windows PowerShell(在我卸载它之前就已经存在)。
安装PowerShell Core后,您将必须使用不同的PowerShell桌面应用程序,一个用于Windows PowerShell
,另一个用于PowerShell Core
。
我在Windows 10上检查了Windows PowerShell的版本,发现安装了5.1。
根据屏幕快照中包含的信息,您启动了Windows PowerShell
命令提示符。
So when I checked under the Installed App in Control panel, I see PowerShell 6.XX. But when I check the Windows Powershell version on the console, it is 5.1.xx ?
PowerShell Core can be installed Windows PowerShell is built into Windows 10 and cannot be installed or removed.
What am I doing wrong or what am I missing? I am bit confused.
You are doing nothing wrong. You simply don't understand the difference between PowerShell Core and Windows PowerShell. If you are attempting to launch a PowerShell 6 command prompt, you need to launch the Desktop application, PowerShell 6
instead of Windows PowerShell
.
It is worth pointing out that uninstalling Windows PowerShell 2.0 does not uninstall Windows PowerShell
on Windows 10. Starting with Windows 8, the version of Windows PowerShell that comes with Windows, cannot be uninstalled. You can only uninstall, the version of Windows PowerShell that comes with the applicable version of the Windows Management Framework, by uninstalling the applicable Windows Management Framework. While you might have you installed Windows Management Framework 5.1
it did not "reinstall" Windows PowerShell since you never actually uninstalled it.
Windows暂时使用PowerShell脚本执行某些操作。这就是您不能从实际卸载默认版本的原因Windows 8
。需要指出的是,出于安全原因,Windows PowerShell 2.0 Engine
除非您特别需要旧版PowerShell脚本,否则您可能实际上要卸载。
仅为了说明Windows PowerShell和PowerShell Core确实是分开的事实,这是同时运行的两个PowerShell命令提示符的屏幕快照。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句