I was trying to install Powershell 2.0 on Windows 2003 server (x64) when I encountered the following error during the installation:
Cannot install this version of the product. You must first remove any earlier version of Windows PowerShell(TM) 1.0 before you can install this version. Please click OK to close the Setup Wizard. Next open Add/Remove Programs Control Panel, uninstall any version of Windows PowerShell(TM) 1.0, and run the Windows PowerShell(TM) 1.0 setup again.
There was no earlier version of Powershell installed but still I got this weird message asking me to remove the ‘earlier’ version.
Here are best possible solutions:
1. Remove the previous version of Powershell 1.0 – Yes, the Powershell won’t be listed under Add/Remove Programs just like that!. You need to check the installed updates.
If its difficult to find the KB number in Add/Remove Program, you can use the command line to list the installed updates.
2. Delete the Registry reference to Powershell – Navigate to the following key, take backup and delete it:
For 64-bit systems: You would find the key under a different location:
That is because, Powershell setup comes in for x86 platform only.
Hope it helps!