Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)

share|improve this question

migrated from serverfault.com May 23 '13 at 15:47

This question came from our site for system and network administrators.

3  
Try downloading WMF 3.0 (or 2.0) again from MS and installing it that way. –  TheCleaner May 23 '13 at 13:26

1 Answer 1

Try running System File Checker. If the file is corrupt it (SFC) should detect it and replace it with the correct one from Windows' installation media (which you might have to supply).

You can read how to do this here: http://support.microsoft.com/kb/929833

or open a command prompt with administrative power (Start > search for "cmd" > right click and select "Run as administrator") and enter:

sfc /scannow

It will work and then give you a message, which should say corrupt files have been repaired. Restart to be safe, and then try PowerShell again.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.