I'm a .NET Developer and now I have to work with PowerShell, the problem is that my PowerShell seems completely broken.

enter image description here

First of all, if use copy paste, it works with some commands but some don't and give me the error The term 'Command Name' is not recognized as the name of a cmdlet, function, script file, or operable program. In that case I have to manually type the exact same command to get it working.

Then when I finally typed the command an run it, the output encoding is not the good one. I've tried various different ways I found on internet to change the encoding of PowerShell but none worked.

When my new company gave me this computer it was all in Chinese. So I changed EVERYTHING to English (System language, System Locale...etc). Everything is in English now but I suspect PowerShell didn't not successfully make the change.

I tried to run a File System Check scan but no problems found and also tried to Uncheck PowerShell 2.0 in Windows Features -> Restart (PowerShell was still here) -> Check PowerShell 2.0 in Windows Feature -> Restart

I hope other people already experienced this and found a way to fix it. The last thing I want is to waste time reinstalling the entire system. My working station is all set-up...

UPDATE: If I use PowerShell ISE instead, the messages are displayed in Chinese but it just says "資訊" which means information

enter image description here

I obviously lose lots of information because here is the result on my personal laptop

enter image description here

Note: My Web Deploy version is 3.6

  • 2
    Look at size of - in command name. Your not working commands have longer - in them (likely em-dash or en-dash), instead of proper - sign. – PetSerAl Aug 22 '18 at 11:27
  • @PetSerAl wow that's right, good catch. Thanks. Now I still need to fix this encoding issue – Jérôme MEVEL Aug 23 '18 at 1:04
  • @Ramhound $PSVersionTable.PSVersion says version 5 (minor 1, build 17134, revision 228) – Jérôme MEVEL Aug 23 '18 at 3:11
  • I edited my question. version 3.6 – Jérôme MEVEL Aug 23 '18 at 3:17
  • I know, I'm working on an automatic deployment process for customers who have our web platform installed on their servers for security reasons. My issue is about encoding, not IIS and Web Deploy – Jérôme MEVEL Aug 23 '18 at 3:25

You have already tried uninstalling and reinstalling PowerShell, but all you are getting is a mixture of English and Chinese.

It seems to me that the change of the system language was not complete, and has not propagated to some Windows components.

I would therefore suggest doing a Repair Install of Windows 10 with an In-place Upgrade.

This will refresh all Windows components and will keep all installed apps and most system settings.

I would suggest taking first good backups of your data, including an image of the system disk, just in case.

  • If you read my question entirely that's what I did already "also tried to Uncheck PowerShell 2.0 in Windows Features -> Restart (PowerShell was still here) -> Check PowerShell 2.0 in Windows Feature -> Restart" and no new Windows Update – Jérôme MEVEL Aug 23 '18 at 0:59
  • Sorry about that - I rewrote my answer. – harrymc Aug 23 '18 at 6:42
  • I assume your answer is working but I didn't have time to try it. I actually completely reinstalled windows for another reason. No more issues now – Jérôme MEVEL Oct 26 '18 at 2:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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