locked
Powershell ISE startup is very slow RRS feed

  • Question

  • When I startup the Powershell ISE, the command window will be running for about 5 minutes before it returns and responds.  Enter any command and it does the same thing all over again.  I am running Windows 10 with Powershell 5.0.  The same behavior is exhibited in 32 or 64 bit version of the ISE.


    My startup profile has next to nothing in it as you can see.  I checked for any other profiles and they don't exist.


    $isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] “Administrator”)

    if ($isAdmin -and ((Get-ExecutionPolicy).ToString() -ne "RemoteSigned")) {
        Write-Host "Current execution policy: $(Get-ExecutionPolicy)"
        Write-Host "Setting exectution policy RemoteSigned"
        Set-ExecutionPolicy RemoteSigned -Force
    }

    # Clear the screen so we don't see any output when opening a new session.
    Clear-Host

    CD C:\


    I ran a Process Monitor to see what is taking so long and it looks like the Powershell ISE is iterating through every dll file on my system, which I have no idea why.  I started seeing this behavior when I started working with DSC and authoring a configuration.  I don't know that it is that specifically, but something is definitely off.


    Using Visual Studio Code gives me the same results, powershell engine does not responds and fails on a timeout.

    Using the Powershell add-in for Visual Studio 2017 Pro gives the same results as well.  Extremely slow performance when doing anything.

    Friday, December 8, 2017 6:59 PM

Answers

  • Turn of AV and test again.  AV appears to be scanning all files loaded.  PS lads about 100+ DLLs at startup.  This is normal.  If AV off improves results then contact AV vendor for help.

    There are too many things that can cause this.  None are script related.  I suggest doing a system repair if the above does not help.


    \_(ツ)_/

    • Marked as answer by Jim In Idaho Thursday, December 14, 2017 9:07 PM
    Friday, December 8, 2017 7:20 PM

All replies

  • Turn of AV and test again.  AV appears to be scanning all files loaded.  PS lads about 100+ DLLs at startup.  This is normal.  If AV off improves results then contact AV vendor for help.

    There are too many things that can cause this.  None are script related.  I suggest doing a system repair if the above does not help.


    \_(ツ)_/

    • Marked as answer by Jim In Idaho Thursday, December 14, 2017 9:07 PM
    Friday, December 8, 2017 7:20 PM
  • Hi,
    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    Best Regards,

    Frank

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, December 13, 2017 8:08 AM
  • Turning off AV definitely improved the startup time of the ISE and the command window.  However when entering commands on the console they are extremely slow still and intellisense times out consistently.  Tried many things on the net and nothing makes a difference.

    An example is typing Get-Content in the command window and pressing enter will cause the window to pause about 20 seconds before responding with a prompt for the required parameters.


    Thursday, December 14, 2017 9:11 PM