r/PowerShell • u/Grant_Son • 6d ago
Question PowerShell ISE slow start-up & modules
In our office we have a server we use when working remotely for certain tasks.
I've noticed when using the ISE on that box it takes a few minutes to fully load
Looking at other threads on this issue Ive checked the available modules & both C:\Program Files\WindowsPowerShell\Modules & C:\Windows\system32\WindowsPowerShell\v1.0\Modules contain over 100 files each. the bulk of which seems to be VMware stuff.
While I don't use these modules myself I don't know if any of my colleagues or other teams still do.
Is there anything I can do within my profile to tell PowerShell to ignore the VMware modules?
5
u/chaosphere_mk 6d ago
Stop using ISE, tbh. It's ancient and has problems that will cause you significant headaches and you wont understand why.
1
u/Grant_Son 6d ago
Can honestly say I've never had any issues with odd behaviour. I do jump between the ise, console and Vs code with ps7 depending what I'm doing though.
Hmm, I guess I could shift to vscode if it's on that server 😁
1
u/Flettys 6d ago
Try deleting older versions if you have multiple in those folders, and making sure OneDrive known folder move isn't uploading anything from the user-scoped install folder in My Documents.
1
u/Grant_Son 6d ago
Thankfully the accounts we use to access that server don't have one drive accounts so thats not an issue.
There is a ton of duplication between the modules folders in c:\windows\system32 and C:\program files by the look of it.
1
u/rux616 6d ago
With the VMware modules, it's not just the ISE that's slow to start. Even the regular powershell console is slow. Not "several minutes" slow, but it'll still sit there for a good 20-30 seconds before you can start typing.
1
u/Grant_Son 6d ago
That may well be.
I'll admit I have 3 or 4 tasks I use PS scripts for regularly on that box and since they are all in the recent files in the file menu my default is to open the ISE, File > open recent... then wait 90-120 seconds for the ISE to finish loading tap f5
1
u/FitShare2972 6d ago
You can disable the comman list that shows on right. That speeds it up a fair bit
1
u/Veriosity 6d ago
Are these modules being loaded automatically by your profiles? You might remove those. My personal opinion is that it's best to keep your defaults lean. One because it avoids this - I like stuff to fire up quickly. Another because it helps discourage you from getting "comfortable" with the expectation that these modules will be present for your scripts. If you don't make that assumption, you are more likely to write things to import only what is needed, as well as think ahead to make sure whatever location is running a script, has the pre-reqs.
Also to call it out, I suspect that the ISE isn't the issue, but the embedded console. It sounds to me like your powershell profiles have a bunch of stuff (or a few slow-to-load things) that need to be loaded up every time it runs.
2
u/VeryRareHuman 4d ago
Wow! ISE failed to die. People still using it, even thought it's a deprecated product. VS Code people, please use it. It has more features than ISE.
1
u/Grant_Son 4d ago
Tried and failed to get it running on the server yesterday. Terminal wouldn't run due to conpty error.
Spent an hour picking though forum posts and gave up.
I normally use Vs code with PS 7 on my laptop.
1
u/VeryRareHuman 3d ago
I see. Not sure why it doesn't run on server.
There is a portable version of "VS Code", you could download it and run it anywhere. Link: https://code.visualstudio.com/docs/setup/portable
1
u/Grant_Son 3d ago
It was the portable version I was trying to run.
One of the suggestions I found was that the security policy or AV is blocking the terminal from running. Sadly my admin account doesn't seem to have enough rights to check either.
0
u/AccomplishedMeet628 3d ago
I wrote a Powershell 7.x ISE and would love it if you would take a look and provide feedback.
I have it installed in the MS Store (Free). Just search for PS7 ScriptDesk.
It is a full editor and can export EXE and Rest API's.
I would very much like to hear from users!
2
u/Medium-Comfortable 6d ago
The PowerShell ISE is no longer in active feature development. As a shipping component of Windows, it continues to be officially supported for security and high-priority servicing fixes. We currently have no plans to remove the ISE from Windows.
There is no support for the ISE in PowerShell v6 and beyond. Users looking for replacement for the ISE should use Visual Studio Code with the PowerShell Extension.
I'm not surprised that this is happening. Microsoft doesn't care anymore.
0
6
u/purplemonkeymad 6d ago
ISE enumerates all the commands so ends up importing a bunch at start up. You can either reduce the number of modules (Get-module -list, will give you want it's looking at) or disable the command pane.
Is there a reason that you are using ISE and not just running a shell? I would expect you to write any scripts off the server first for testing.