I was trying to reinstall Windows PowerShell on Windows 10 after I accidentally removed it. I was trying to upgrade to latest PowerShell Core and in the instructions to remove AzureRM module with the new Az module, I removed the Windows PowerShell on Windows 10.
I checked this link to get some clue about how to install Windows PowerShell on Windows 10. And it appears that one can not install Windows PowerShell individually. So I installed Windows Powershell Core 6.xx from here,
Edit:
please note: I am unable to install WMF 5.1 on window 10.
But now I see Powershell 6.XX in the installed app instead of Windows PowerShell (which was there before I uninstalled it).
I checked the version of the Windows PowerShell on my Windows 10 and found that I have 5.1 installed.
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 console, it is 5.1.xx ?
What am I doing wrong or what am I missing? I am bit confused.
I was trying to reinstall Windows PowerShell on Windows 10 after I accidentally removed it.
Since you are running Windows 10, it is not actually possible, to uninstall PowerShell 5.1. Windows PowerShell 2.0 Engine
can be installed for compatibility reasons and is not necessary to run PowerShell 5.1.
I was trying to upgrade to latest PowerShell Core and in the instructions to remove AzureRM module with the new Az module, I removed the Windows PowerShell on Windows 10.
What you removed is PowerShell Core
, which is a fork of PowerShell 5.1, and is installed independently and exists alongside the Windows PowerShell
.
But now I see Powershell 6.XX in the installed app instead of Windows PowerShell (which was there before I uninstalled it).
When PowerShell Core is installed, you would have to different PowerShell desktop applications, one for Windows PowerShell
and the other for PowerShell Core
.
I checked the version of the Windows PowerShell on my Windows 10 and found that I have 5.1 installed.
Based on the information contained within the screenshot, you have launched a Windows PowerShell
command prompt.
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 has for awhile used PowerShell scripts to perform certain actions. Which is the reason you cannot actually uninstall the default version, starting with Windows 8
. It is important to point out, for security reasons, you might actually want to uninstall the Windows PowerShell 2.0 Engine
unless you need it specifically for legacy PowerShell scripts.
Source: Windows PowerShell System Requirements
Source: Upgrading existing Windows PowerShell
Just to illustrate the fact Windows PowerShell and PowerShell Core are indeed separate, this is a screenshot of two PowerShell command prompts, running at the same time.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加