0

I have a brand new install of Windows 8.1 with Visual Studio.

Running Powershell opens a window that closes immediately. Launching powershell from cmd.exe, I get the following error:

Windows PowerShell failed with the following error:

Value cannot be null. 

Parameter name: input

I suspect the .net install has screwed up whatever version powershell uses. But all the answers I can find about this error are for developing cmdlets etc.

5
  • How are you launching PowerShell exactly? try running it directly from C:\Windows\System32\WindowsPowerShell\v1.0 will it open? Dec 24, 2013 at 19:44
  • I'm launching it from cmd.exe, as mentioned in the question. cding into the dir mentioned and running powershell.exe returns the same message. Dec 24, 2013 at 19:45
  • OK, and if you go to C:\Windows\System32\WindowsPowerShell\v1.0 and run PowerShell there, what happens? That's really the meat of the question. Also, your body is ambiguous with: Running Powershell opens a window that closes immediately. and then Launching powershell from cmd.exe Dec 24, 2013 at 19:50
  • cding into the dir does the same thing. I initially launched powershell from the GUI, where it did not produce an error message. I subsequently launched it from cmd to get the error message shown. Dec 24, 2013 at 19:53
  • does it go away after uninstall visual studio ? Dec 24, 2013 at 21:07

1 Answer 1

1

Windows 8.1 includes the Microsoft .NET Framework 4.5.1, so that should not be an issue. Have you tried running PowerShell with the -NoProfile parameter? In case you have a Windows PowerShell profile, this will prevent the execution of that profile script, and may solve the issue.

You might also want to try running (from cmd.exe) the following command, just to see if you get any output:

powershell.exe -Command Get-Process;
2
  • 1
    In the end, I ended up reinstalling Windows - I didn't trust the install. The problem is solved. However I've marked this as the correct answer, as I suspect either Visual Studio or Expression Blend created a broken profile. Sorry I can't upvote, I'm too new! Dec 26, 2013 at 15:32
  • Glad to hear you're working now, thanks! By the way, Visual Studio should not create a PowerShell profile script, that I'm aware of ... I have no idea what the root cause of your situation was, but that seems unlikely. I thought maybe you had created a custom profile script. Dec 26, 2013 at 18:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .