Powershell loading slow everytime

When open Powershell on windows it take a lot of time until console is ready. Here some setting to check :

  1. Profile Scripts ($Profile): Scripts in your PowerShell profile run every time the console starts. Slow commands, large module imports, or network drive mappings within the profile are common causes of delays. try to start powershell with no profile : powershell.exe -noprofile
  2. .NET Framework Optimization: PowerShell is built on the .NET Framework, which performs optimization tasks on first use. A corrupted cache or incomplete optimization can cause slow startups. try to Use the ngen.exe (Native Image Generator) tool to compile PowerShell assemblies into native machine code.
  3. Certificate Revocation List (CRL) Checks: PowerShell might attempt to check certificate revocation lists for signed modules (e.g., some AWS or VMware modules) over the internet. If the system has limited or no internet access, this can cause a timeout delay. Try to Disable CRL checking via a registry setting (reg add HKLM\SYSTEM\CurrentControlSet\Services\SstpSvc\Parameters /v NoCertRevocationCheck /t REG_DWORD /d 0x00000001 /f) or ensure internet connectivity.
  4. Large History File: An excessively large PowerShell command history file (located at C:\Users\username\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt) can slow down startup. Try to clear the content

Leave a Reply

Your email address will not be published. Required fields are marked *