7
Is it in any way possible to uninstall PowerShell from Windows Vista?
- There is no Uninstall option under Start/All Programs.
- It's start menu group is actually located under Accessories which is hard to find at first.
- There is no uninstaller.
- It doesn't show up in the Add/Remove program list (Programs and Features).
- It's actually hidden in the Installed Updates window.
- It's not listed as "PowerShell" in the Installed Updates window. It's actually named "Management Framework Core".
Why I need to remove it
The reason I need to remove it is because the Windows Vista setup program requires that I remove PowerShell before I can do a repair install of Windows.
(Click on image for larger view.)
What I have done so far
Uninstalling KB968930 a.k.a. Management Framework Core a.k.a. PowerShell
I obviously tried uninstalling it from the Programs and Features window in Control Panel. But it's actually only accessible as an update from Installed Update window.
- Control Panel
- Programs (or "Uninstall a program")
- Programs and Features
- Click on "View installed updates" link on the left.
- Type in "KB968930" in the Search field.
- Select "Windows Management Framework Core (KB968930)" from search results.
- Click Uninstall button.
- "Are you sure you want to uninstall this update?" Click Yes.
- "Please wait while the updates are being uninstalled. This might take several minutes."
- "An error has occurred. Not all of the updates were successfully uninstalled."
This did not resolve the issue.
Registry change, taking ownership and renaming of folder
Next, I tried changing the following registry key.
FROM THIS:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1
Value: Install
Type: Reg_Dword
Data: 0
TO THIS:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1
Value: Install
Type: Reg_Dword
Data: 1
Then I started elevated cmd prompt and I used it to take ownership of the PowerShell directory.
C:\Windows\system32>takeown /f %windir%\system32\windowspowershell
SUCCESS: The file (or folder): "C:\Windows\system32\windowspowershell" now owned
by user "computername\username".
C:\Windows\system32>cacls %windir%\system32\windowspowershell /G administrators:
F
No mapping between account names and security IDs was done.
C:\Windows\system32>icacls %windir%\system32\windowspowershell /G administrators
:F
Invalid parameter "/G"
C:\Windows\system32>cacls %windir%\system32\windowspowershell /G administrators:
F
No mapping between account names and security IDs was done.
C:\Windows\system32>icacls %windir%\system32\windowspowershell /grant administra
tors:F
administrators: No mapping between account names and security IDs was done.
Successfully processed 0 files; Failed processing 1 files
C:\Windows\system32>
I wasn't sure whether I should use the cacls
or icacls
command and I wasn't sure of the syntax (any input on that?). But anyway! I was now the owner of the directory and I was able to rename it.
- Win+R
- C:\Windows\System32\
- Renamed "WindowsPowerShell" to "WindowsPowerShellOld"
So the path is now C:\Windows\System32\WindowsPowerShellOld. PowerShell is now "somewhat" disabled i.e. shortcuts on Start menu don't work now and running powershell.exe directly from C:\Windows\System32\WindowsPowerShellOld\v1.0
shows a cmd like command prompt with black background and several red error lines that say "file not found".
But the main problem is still not solved. I still can't do repair install of Windows. Setup program still reports that PowerShell is installed.
So.... any clever ideas? What else can I do?
The only thing that remains now is to do a clean install of Windows.
1did you update from powershell 1 to 2 or 3? – Keltari – 2013-06-17T22:16:22.913
do the same what I advised this user: http://superuser.com/questions/608822/error-80070008-while-trying-to-install-windows-7-sp1#comment753006_608822 upload the CBS folder after you tried to uninstall KB968930
– magicandre1981 – 2013-06-18T07:58:26.040@Keltari No, I did not update to version 2 or 3. It's version 1.0. You can see that from the search path just above the comment section. – Samir – 2013-06-18T09:32:55.227
@magicandre1981 It won't be needed now, as I have solved the issue. But thank you for your help! I mean not just here, but for answering my other questions as well. Thanks! – Samir – 2013-06-18T10:00:09.613
@MDT Guy Thank you MDT Guy for removing the "crazy horse of a program" and the MS remark. :) I wanted to remove it today, but I see you have been busy cleaning here. It really is no place for that in here. – Samir – 2013-06-18T10:06:25.043