Hey everyone, I'm experiencing some serious slowdowns with PowerShell on my brand new PC, which I just got for uni after saving up from my job. It takes an eternity to run basic commands—like 14 seconds for 'ls' and 3 seconds for the prompt to come back. Even launching PowerShell itself is a slow process, taking around 7 seconds to start. I've tried it on both Windows PowerShell and PowerShell 7, and the issues remain consistent. Does anyone have suggestions on how to speed it up?
Edit: I found out that McAfee was causing a lot of the lag, and after uninstalling it, PowerShell works perfectly! Thanks for everyone's help! Just to clarify, I don't have any major beef with PowerShell—my frustration was directed at the lagging issue.
5 Answers
Back in my day, there was something called a command analysis file that could get bloated and slow things down. They likely fixed it, but it’s worth checking if that’s a problem for you too. Clearing that up could make a significant difference!
First off, I’d suggest checking your PC's resource usage—are there any spikes in CPU, RAM, or disk activity while you’re using PowerShell? It sounds more like a resource issue rather than PowerShell itself. Also, remember that PowerShell 7.4 runs alongside 5.1, so it might be helpful to look into that as well. Try typing 'pwsh' to see if you’re using the right version!
Sometimes, having too many modules installed can slow things down, especially if they’re for the CurrentUser profile. If you have OneDrive backing up your Documents folder, that can add to the lag too. Basic commands like 'ls' can run slow if your system is doing AV checks or if your hard drive is failing. Definitely investigate that!
If it’s a fresh PC, it might just be busy processing multiple background tasks. Give it some time to settle down and see if the performance improves. That said, it shouldn’t be that slow; check your storage too—if it’s an HDD, that could be an issue. McAfee's known to drag performance down, so maybe try uninstalling it and see if there's a change!
Are your folders redirected to a network share? That could also affect performance. Take a look at your modules path and test the behavior with another account. It might help to clarify what you've already tried—more details could lead to better advice!
Thanks for the input! I didn’t notice any spikes in Task Manager, but I'm starting to think the McAfee Framework might be a culprit. What do you think?