Powershell and Powershell ISE start is very slow. over a minute to load.

This topic contains 11 replies, has 5 voices, and was last updated by Profile photo of Rob Dowell Rob Dowell 1 week, 2 days ago.

  • Author
    Posts
  • #75143
    Profile photo of Matthew
    Matthew
    Participant

    When opening either powershell or powershell ISE it take easily over a minute for either to be ready to use. I will also be very slow running commands. something as simple as Get-PSDrive takes at least a minute or more to run.
    I am currently running Win 7 x64. PSshell version 5..0.10514.6

  • #75145
    Profile photo of Ben Camareno
    Ben Camareno
    Participant

    Check your $profile file. See if there's any functions trying to load at start up.

    Also check $env:PSModulePath and see if you a network paths in there. That slows down PowerShell and intellisense a lot.

  • #75146
    Profile photo of Matthew
    Matthew
    Participant

    thank you for the response.
    I checked my Profile file and there was nothing but a command to set dir to C:\. I just deleted it.
    $env:PSModulePath returns C:\user\xxxxx\documents\WindowsPowershell\modules:C:\Windows\system32\windowspowershell\v1.0\modules
    Power shell still running very slow.
    Since I am running x64 bit should the path be windows\WOW64\Windowspowershell\v1.0\module ?

    • #75170
      Profile photo of Ben Camareno
      Ben Camareno
      Participant

      Are you using roaming profiles?

      Also, try downloading PowerShell v6 and see how that behaves on your machine.

      PowerShell v6

    • #75188
      Profile photo of Matthew
      Matthew
      Participant

      Ben
      I am not using roaming profiles.
      Can Windows 7 run powershell V6? I see downloads for Windows 8.1 and 10 but not 7.

  • #75149
    Profile photo of Will Anderson
    Will Anderson
    Keymaster

    How many modules do you have installed?

  • #75152
    Profile photo of Matthew
    Matthew
    Participant

    get-module shows only 4 installed modules.

  • #75154
    Profile photo of Ivan
    Ivan
    Participant

    What about your .NET install? not sure but since PowerShell depends/uses the .NET framework maybe something is funky there.

  • #75157
    Profile photo of Rob Dowell
    Rob Dowell
    Participant

    Did you check all 4 profiles?

    Description Path
    ———– —-
    Current User, Current Host $Home\[My ]Documents\WindowsPowerShell\Profile.ps1
    Current User, All Hosts $Home\[My ]Documents\Profile.ps1
    All Users, Current Host $PsHome\Microsoft.PowerShell_profile.ps1
    All Users, All Hosts $PsHome\Profile.ps1

  • #75158
    Profile photo of Will Anderson
    Will Anderson
    Keymaster

    What does Get-Module -ListAvailable show?

  • #75161
    Profile photo of Matthew
    Matthew
    Participant

    Ivan I am now running MS .net framework 4.6.2. Tried upgrading and it did not help.

    Rob all modules are in C:\Windows\system32\windowspowershell\v1.0\modules
    two are Manifest and one is Script

    Will Get-Module -ListAvailable shows 2 modules in Directory: C:\Program Files\WindowsPowerShell\Modules
    and 23 in Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

  • #75263
    Profile photo of Rob Dowell
    Rob Dowell
    Participant

    I was asking if you had looked at all the potential profile files. Not the modules.

You must be logged in to reply to this topic.