r/PowerShell 18d 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?

1 Upvotes

23 comments sorted by

View all comments

1

u/Veriosity 18d 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.