Share via


PowerShell ISE stuck in loading screen

Question

Tuesday, May 2, 2017 10:54 AM

Every time I'm away from the location where my mapped (to S:\ network drive is located (and thus inaccessible), the PowerShell ISE stalls in the "Loading..." screen.

The profile.ps1 never gets a chance to run because the PowerShell ISE never escapes from the Loading... screen.

The normal PowerShell prompt works fine, but it doesn't provide all the nice features of the PowerShell ISE, so I would like to find a way to get the PowerShell ISE to work when I'm away from the physical location where the mapped network drive works.

If I remember to unmap the network drive via (net use s: /delete) before I leave that location, everything is fine.  It's when I forget to unmap the drive prior to shutting down and moving to a different location that this problem rears its ugly head.

It's as if the PowerShell ISE is trying to access the underlying UNC \whatever\something\ even though there is no hope of doing so if I'm physically away from the location where that UNC exists.

Is there some way to fix this issue that doesn't involve reinstalling Windows 10 Enterprise 64-bit?  I'm hoping some kind of registry hack will alleviate the need to constantly unmap before shutting down at the physical location of the UNC before going to a remote location where the UNC is inaccessible and remap when I return to where the UNC is accessible.

This has been happening since January 2017.

If you think development is tough now, think how hard it was using punched cards :-)

All replies (7)

Tuesday, May 2, 2017 6:15 PM

Seen this posted before but cannot find that post and cannot remember if it was ever resolved (don't think it was).

As a work-around under Tools > Options on the second tab General Settings bottom option Number of recent files to show, set that to zero. Just a thought...


Wednesday, May 3, 2017 3:53 AM

Every time I'm away from the location where my mapped (to S:\ network drive is located (and thus inaccessible), the PowerShell ISE stalls in the "Loading..." screen.

What is it doing?  If it is waiting to try to open a tab you can try starting it with -NoProfile.  Other options seem possible, according to   ISE -?

Heh.  Here's something different...  ise  -File Nul:

it crashed and then opened a new Untitled.ps1

But depending on what yours is doing you may be able to hide the Script pane or press Ctrl-Break (apparently).  Etc.

Robert Aldwinckle


Wednesday, May 3, 2017 10:36 AM

What it is doing is it opens the splash screen with the phrase "Loading..." that never closes.

I've tried -NoProfile and erasing both my personal profile.ps1 and the global profile.ps1, but none of those help.

It is as if PowerShell ISE is trying to enumerate all "POSSIBLE" PsDrive's, such as the S:\ mapped drive and going into an infinite loop trying to reach an unreachable PsDrive.

I'm 99% certain this is a bug in PowerShell ISE.  

Microsoft needs to fix it by putting a time limit on the loop that tries to enumerate existing PsDrive's and ignore or warn if any of them are inaccessible, such as my mapped S: drive,which is guaranteed to be unreachable when I am away from the physical location where that drive is located (it's not on any network outside of that location).

The work-around of "net use s: /delete" works, but it is annoying to have to remember, and, if I am in a hurry and forget, I cannot use PowerShell ISE until I return to the location where the physical S: drive is located because, once I am away from that location, typing "net use s: /delete" is useless and simply spits out an error saying the drive in question is unreachable (well DUH! Tell me something I do not already know!).

This has been going on since January 2017.  I keep hoping each monthly "Patch Tuesday" will bring about a solution, but so far, nothing has changed.

If you think development is tough now, think how hard it was using punched cards :-)


Wednesday, May 3, 2017 1:19 PM

Did you try the  ise -file Nul:  example?

Robert Aldwinckle


Wednesday, May 3, 2017 4:11 PM

Specifying -file Nul: does not work.

I'm 99% certain that if Microsoft would stop ISE from trying to enumerate unreachable PsDrive's (with or without corresponding warning/error message), the problem will be fixed.

I do not think this is something I can solve.  Only Microsoft can fix it.

If you think development is tough now, think how hard it was using punched cards :-)


Wednesday, May 3, 2017 9:32 PM

this was your previous post:
Why does PowerShell ISE go into an infinite loop at start up when mapped network drive is not available when I am off site?
I gave some hints (writing a dump, using Process Monitor).

When you want to analyze for yourself, you could do it like this:
Know the Stack (or More Hang Analysis Using Process Explorer)


Wednesday, May 3, 2017 9:59 PM

When Microsoft starts paying me to fix their bugs, I will gladly stop doing my real job and start doing theirs.

Maybe when I retire, I can take up Process Explorer as a hobby instead of making bead ornaments.

If you think development is tough now, think how hard it was using punched cards :-)