Why is PowerShell running so slowly on my new PC?
Asked by
!practice the landing
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.
Answers
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!
Reply to this answer
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!
Reply to this answer
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!
Reply to this answer
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!
Reply to this answer
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!
Reply to this answer
Add your answer
Answers are reviewed before publication.
!decimal notation: 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?