When I try to run powershell.exe from C:\Windows\System32\WindowsPowerShell\v1.0 I get the error: 'The volume for a file has been externally altered so that the opened file is no longer valid.'
I have not been able to find out why I get this error. If I make a copy of the powershell.exe and run it, no problems.
So I thought I'd just remove powershell and install it again. But how can I do this with Windows 7? Powershell does not appear in the Control Panel 'Programs and Features' list.
Manually deleting the powershell.exe file does not work either - I am told that I require permission from TrustedInstaller in order to change the file.
Anyone got any ideas?
-- UPDATE --
I installed WMF 3, as suggested in the comment, but still get the same error when running powershell.exe.
My current workaround is quite horrible - I just made a new folder containing a copy of the powershell.exe, added it to the windows PATH, and removed the standard system32\WindowsPowershell\v1.0 folder from the path)