2
1
It seems that Powershell, right after I start my computer and log into Windows 10, will be alright for awhile. But something seems to be hanging it on occasion, where I will not be able to do anything with Powershell.
I'll open a new Powershell window, and it will not display the prompt at all. It'll show just the version up top. I've included a screenshot link to show you what I mean.
Powershell Window - Prompt never comes up:
Running Powershell -NoProfile
has no effect when this starts. The only solution when this happens is to restart, and this gets to be time consuming if I have to do this all the time.
It was doing this on Windows 10 Build 1511, and I wound up installing the Anniversary Update. Now on Build 1607, it's still doing this.
Also, when this issue begins happening, Visual Studio 2015's Package Update Manager and NuGet's package manager will also hang and stop working as they seem to both use Powershell.
I have looked high and low on Google, and cannot find anyone having reported this exact issue. I have seen people post about it hanging on error or it working with -NoProfile
, but that is not what's happening here. The prompt just doesn't come up when this rears its ugly head.
This also was happening shortly after a fresh install of Windows 10 on a new hard drive (SSHD, 1 TB), so wiping and reinstalling is not an option (that and I already lost a week on reinstalling my system earlier this summer and literally cannot afford any more extensive downtime).
How much time did you actually give it to come up? Did you make sure there was no hidden prompt for confirmation and did you check your AV if you have one for any errors? The Windows Event Log might also have information on any errors that come up if it hangs? – Seth – 2016-09-09T09:55:38.353
I gave it about an hour. I noticed no events in the Event Log for the actual Powershell window. Now, before I installed the Anniversary Update, if I had tried to run Powershell in a command prompt window, and then closed the window, I'd get a popup that Powershell has stopped working and I would get an Event Log event that mentioned a NullReferenceException. (I no longer have those since the Anniversary Update was installed, regrettably). There were no AV errors reported (using AVG 2016). As far as hidden prompts, I do know no key strokes had any effect, so I don't think there were any. – Abandoned – 2016-09-11T00:29:29.533
That's plenty of time. Do you have any custom profile setup that loads when you start PowerShell? It really sounds like something is broken if you had errors while exiting PowerShell. Long load times could be caused by the AV scanning all the things but more than an hour sounds odd for that. – Seth – 2016-09-12T05:46:26.750
I don't really have any custom profile set up at all. I do notice a correspondence as to the Powershell freeze when AVG is also frozen in a scan... which seems to happen during the Rootkit scan almost exclusively from what I've noticed. Highly inconvenient as disabling that rootkit scan would leave me vulnerable to those. I am wondering if there isn't something with the rootkit scan that doesn't also hose Powershell. Going to try disabling that part of the scan (yes, I know, security hole and all), and see if the issue recurs. – Abandoned – 2016-10-01T20:09:18.320
There might be an option to exclude certain files or directories from scans. By targeting it to PS you might be able to minimize the security loss. – Seth – 2016-10-02T09:03:04.590
Well, I've had a reboot cycle since the last virus scan froze (even with a couple exceptions put in for the scans), and Powershell still froze. Rebooted, tested and immediately Powershell after reboot was already stuck. I'm fairly confident it's not AVG now (and whatever is causing this could be causing the AVG issue as well). Did a double-reboot (Restarted, then at the Windows 10 login screen, hit restart again, then logged in after that reboot), and it's working for now. (I had to do a NuGet update in Visual Studio so I had to restart). MalwareBytes shows no infections. Still stumped. – Abandoned – 2016-10-10T05:29:18.960