I wish PS was faster to start in general. Even without any profiles the first launch after a fresh boot is pretty slow regardless of how fast your PC is. On slower/busier PCs it can easily take several seconds and it makes me pick cmd over PS for simple tasks like viewing the IP address or launching a program from a folder with special arguments.
True. What really kills me is the time it takes for the first tab-completion of a session if you're tab-completing something from a module, like Get-ADUser -Prop *tab*. I could have typed the LDAP query faster than it takes to complete lol.
I think the console basically tries to parse your entire $PsModulePath when you do that, which takes ages especially on HDDs (don't ask me why I'm still using an HDD as a system drive in 2021). This is something that could be optimized a lot, I'm not sure I need my VMWare module ready to go if I'm doing AD work.
The slow tab completion in this situation is because it has to import the module to figure out what parameters are available for the command. If you import the AD module in your $Profile you won't see this happen but this will of course make the initial start up slower.
34
u/Thotaz Apr 06 '21
I wish PS was faster to start in general. Even without any profiles the first launch after a fresh boot is pretty slow regardless of how fast your PC is. On slower/busier PCs it can easily take several seconds and it makes me pick cmd over PS for simple tasks like viewing the IP address or launching a program from a folder with special arguments.