Powershell slow starting on Windows 10Why would Windows PowerShell slow startup?Powershell XML precessing...

Book about a time-travel war fought by computers

Why doesn't "adolescent" take any articles in "listen to adolescent agonising"?

Is there a math equivalent to the conditional ternary operator?

is 'sed' thread safe

Correct physics behind the colors on CD (compact disc)?

How can I be pwned if I'm not registered on the compromised site?

Giving a talk in my old university, how prominently should I tell students my salary?

Plagiarism of code by other PhD student

Can the Shape Water Cantrip be used to manipulate blood?

Ahoy, Ye Traveler!

How to mitigate "bandwagon attacking" from players?

Are small insurances worth it

GDAL GetGeoTransform Documentation -- Is there an oversight, or what am I misunderstanding?

Misplaced tyre lever - alternatives?

Is there any relevance to Thor getting his hair cut other than comedic value?

Draw bounding region by list of points

Is there a frame of reference in which I was born before I was conceived?

Split a number into equal parts given the number of parts

Script that counts quarters, dimes, nickels, and pennies

Can a space-faring robot still function over a billion years?

It doesn't matter the side you see it

Wardrobe above a wall with fuse boxes

Create chunks from an array

Deal the cards to the players



Powershell slow starting on Windows 10


Why would Windows PowerShell slow startup?Powershell XML precessing very slowSlow starting Mac OS XPowershell very slow to open/respondStarting vim from Windows PowerShellStarting a Program with Powershell RemotingWhy Powershell is so slow?“$Error” already populated when starting PowerShellTime Windows applications launching (via Powershell?)Avoid dot backslash Windows 10 Powershell













8















I have problem with slow starting of powershell prompt on Windows 10 ( Version 1703 - Creators Update ).



My hw specs ( quite fast machine ): Intel i5-7440HQ (Quad Core) / 32GB DDR4 RAM / 512 Samsung SSD hard drive.



I tried to bypass profile and execution policy but it does not change anything:




powershell -noprofile -ExecutionPolicy Bypass ( Measure-Command { powershell "Write-Host 1" } ).TotalSeconds



6,228067




My friends same laptop with Windows 10 without Creators Update runs powershell in less than 0,5 sec.



Also tried do some compilation with ngen.exe but it didn't help:



$env:path = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() | % {
if (! $_.location) {continue}
$Name = Split-Path $_.location -leaf
Write-Host -ForegroundColor Yellow "NGENing : $Name"
ngen install $_.location | % {"`t$_"}
}


Any idea how may I investigate this issue?



Greetings










share|improve this question

























  • You should start by checking your profile script to see if anything is running in there that is delaying startup. My output is 1.2774795 seconds. Also, what machine, processor, memory, other things running?

    – Julian Knight
    May 24 '17 at 14:33








  • 6





    powershell is always slow to start. But Ms ignores those complains and only response "powershell is fast"

    – magicandre1981
    May 24 '17 at 14:36











  • As You see -noprofile option is set. No difference.

    – mike
    May 24 '17 at 17:21











  • I see it. send this to MS, but they ignore any reports that powershell is slow

    – magicandre1981
    May 25 '17 at 18:27






  • 1





    again, for me powershell is also always slow. ask this Microsoft.

    – magicandre1981
    May 26 '17 at 15:41
















8















I have problem with slow starting of powershell prompt on Windows 10 ( Version 1703 - Creators Update ).



My hw specs ( quite fast machine ): Intel i5-7440HQ (Quad Core) / 32GB DDR4 RAM / 512 Samsung SSD hard drive.



I tried to bypass profile and execution policy but it does not change anything:




powershell -noprofile -ExecutionPolicy Bypass ( Measure-Command { powershell "Write-Host 1" } ).TotalSeconds



6,228067




My friends same laptop with Windows 10 without Creators Update runs powershell in less than 0,5 sec.



Also tried do some compilation with ngen.exe but it didn't help:



$env:path = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() | % {
if (! $_.location) {continue}
$Name = Split-Path $_.location -leaf
Write-Host -ForegroundColor Yellow "NGENing : $Name"
ngen install $_.location | % {"`t$_"}
}


Any idea how may I investigate this issue?



Greetings










share|improve this question

























  • You should start by checking your profile script to see if anything is running in there that is delaying startup. My output is 1.2774795 seconds. Also, what machine, processor, memory, other things running?

    – Julian Knight
    May 24 '17 at 14:33








  • 6





    powershell is always slow to start. But Ms ignores those complains and only response "powershell is fast"

    – magicandre1981
    May 24 '17 at 14:36











  • As You see -noprofile option is set. No difference.

    – mike
    May 24 '17 at 17:21











  • I see it. send this to MS, but they ignore any reports that powershell is slow

    – magicandre1981
    May 25 '17 at 18:27






  • 1





    again, for me powershell is also always slow. ask this Microsoft.

    – magicandre1981
    May 26 '17 at 15:41














8












8








8


2






I have problem with slow starting of powershell prompt on Windows 10 ( Version 1703 - Creators Update ).



My hw specs ( quite fast machine ): Intel i5-7440HQ (Quad Core) / 32GB DDR4 RAM / 512 Samsung SSD hard drive.



I tried to bypass profile and execution policy but it does not change anything:




powershell -noprofile -ExecutionPolicy Bypass ( Measure-Command { powershell "Write-Host 1" } ).TotalSeconds



6,228067




My friends same laptop with Windows 10 without Creators Update runs powershell in less than 0,5 sec.



Also tried do some compilation with ngen.exe but it didn't help:



$env:path = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() | % {
if (! $_.location) {continue}
$Name = Split-Path $_.location -leaf
Write-Host -ForegroundColor Yellow "NGENing : $Name"
ngen install $_.location | % {"`t$_"}
}


Any idea how may I investigate this issue?



Greetings










share|improve this question
















I have problem with slow starting of powershell prompt on Windows 10 ( Version 1703 - Creators Update ).



My hw specs ( quite fast machine ): Intel i5-7440HQ (Quad Core) / 32GB DDR4 RAM / 512 Samsung SSD hard drive.



I tried to bypass profile and execution policy but it does not change anything:




powershell -noprofile -ExecutionPolicy Bypass ( Measure-Command { powershell "Write-Host 1" } ).TotalSeconds



6,228067




My friends same laptop with Windows 10 without Creators Update runs powershell in less than 0,5 sec.



Also tried do some compilation with ngen.exe but it didn't help:



$env:path = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() | % {
if (! $_.location) {continue}
$Name = Split-Path $_.location -leaf
Write-Host -ForegroundColor Yellow "NGENing : $Name"
ngen install $_.location | % {"`t$_"}
}


Any idea how may I investigate this issue?



Greetings







windows-10 performance powershell






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 24 '17 at 19:36







mike

















asked May 24 '17 at 14:31









mikemike

6626




6626













  • You should start by checking your profile script to see if anything is running in there that is delaying startup. My output is 1.2774795 seconds. Also, what machine, processor, memory, other things running?

    – Julian Knight
    May 24 '17 at 14:33








  • 6





    powershell is always slow to start. But Ms ignores those complains and only response "powershell is fast"

    – magicandre1981
    May 24 '17 at 14:36











  • As You see -noprofile option is set. No difference.

    – mike
    May 24 '17 at 17:21











  • I see it. send this to MS, but they ignore any reports that powershell is slow

    – magicandre1981
    May 25 '17 at 18:27






  • 1





    again, for me powershell is also always slow. ask this Microsoft.

    – magicandre1981
    May 26 '17 at 15:41



















  • You should start by checking your profile script to see if anything is running in there that is delaying startup. My output is 1.2774795 seconds. Also, what machine, processor, memory, other things running?

    – Julian Knight
    May 24 '17 at 14:33








  • 6





    powershell is always slow to start. But Ms ignores those complains and only response "powershell is fast"

    – magicandre1981
    May 24 '17 at 14:36











  • As You see -noprofile option is set. No difference.

    – mike
    May 24 '17 at 17:21











  • I see it. send this to MS, but they ignore any reports that powershell is slow

    – magicandre1981
    May 25 '17 at 18:27






  • 1





    again, for me powershell is also always slow. ask this Microsoft.

    – magicandre1981
    May 26 '17 at 15:41

















You should start by checking your profile script to see if anything is running in there that is delaying startup. My output is 1.2774795 seconds. Also, what machine, processor, memory, other things running?

– Julian Knight
May 24 '17 at 14:33







You should start by checking your profile script to see if anything is running in there that is delaying startup. My output is 1.2774795 seconds. Also, what machine, processor, memory, other things running?

– Julian Knight
May 24 '17 at 14:33






6




6





powershell is always slow to start. But Ms ignores those complains and only response "powershell is fast"

– magicandre1981
May 24 '17 at 14:36





powershell is always slow to start. But Ms ignores those complains and only response "powershell is fast"

– magicandre1981
May 24 '17 at 14:36













As You see -noprofile option is set. No difference.

– mike
May 24 '17 at 17:21





As You see -noprofile option is set. No difference.

– mike
May 24 '17 at 17:21













I see it. send this to MS, but they ignore any reports that powershell is slow

– magicandre1981
May 25 '17 at 18:27





I see it. send this to MS, but they ignore any reports that powershell is slow

– magicandre1981
May 25 '17 at 18:27




1




1





again, for me powershell is also always slow. ask this Microsoft.

– magicandre1981
May 26 '17 at 15:41





again, for me powershell is also always slow. ask this Microsoft.

– magicandre1981
May 26 '17 at 15:41










3 Answers
3






active

oldest

votes


















2














What you could try is create a shortcut to powershell.exe , right-click on it > properties, go to tab options, click on "use legacy console". My screenreader (magic and zoomtext) couldn't stand the 'new' çonsole which came with the fall update (Powershell was veeeerrrrry slow) With legacy on everything works fine again.






share|improve this answer































    0














    This was happening to me also - though maybe not the best route, adding powershell.exe to the list of Windows Defender exclusions sped it up from 20 seconds to < 1 second.



    Using legacy console, purging PSReadLine, and running ngen did not seem to help at all.






    share|improve this answer































      -1














      I had been experiencing the same issue for quite some time until PowerShell started failing on startup with the following error:



      Exception:
      System.OutOfMemoryException: Array dimensions exceeded supported range.
      at System.Collections.Generic.List`1.set_Capacity(Int32 value)
      at System.Collections.Generic.List`1.EnsureCapacity(Int32 min)
      at System.Collections.Generic.List`1.Add(T item)
      at System.IO.File.InternalReadAllLines(String path, Encoding encoding)
      at Microsoft.PowerShell.PSConsoleReadLine.<ReadHistoryFile>b__67_0()
      at Microsoft.PowerShell.PSConsoleReadLine.WithHistoryFileMutexDo(Int32 timeout, Action action)
      at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
      at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
      at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
      -----------------------------------------------------------------------


      This led me to the existing Github issue: https://github.com/lzybkr/PSReadLine/issues/673



      I tried deleting history file in ~AppDataRoamingMicrosoftWindowsPowerShellPSReadline which was over 6 GB by then and after that PowerShell console started opening pretty quickly.



      Maybe the slowness you experience is the PowerShell trying to read a big history file (which is not yet big enough to cause OutOfMemory).






      share|improve this answer























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "3"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1212442%2fpowershell-slow-starting-on-windows-10%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        2














        What you could try is create a shortcut to powershell.exe , right-click on it > properties, go to tab options, click on "use legacy console". My screenreader (magic and zoomtext) couldn't stand the 'new' çonsole which came with the fall update (Powershell was veeeerrrrry slow) With legacy on everything works fine again.






        share|improve this answer




























          2














          What you could try is create a shortcut to powershell.exe , right-click on it > properties, go to tab options, click on "use legacy console". My screenreader (magic and zoomtext) couldn't stand the 'new' çonsole which came with the fall update (Powershell was veeeerrrrry slow) With legacy on everything works fine again.






          share|improve this answer


























            2












            2








            2







            What you could try is create a shortcut to powershell.exe , right-click on it > properties, go to tab options, click on "use legacy console". My screenreader (magic and zoomtext) couldn't stand the 'new' çonsole which came with the fall update (Powershell was veeeerrrrry slow) With legacy on everything works fine again.






            share|improve this answer













            What you could try is create a shortcut to powershell.exe , right-click on it > properties, go to tab options, click on "use legacy console". My screenreader (magic and zoomtext) couldn't stand the 'new' çonsole which came with the fall update (Powershell was veeeerrrrry slow) With legacy on everything works fine again.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 15 '18 at 10:36









            Peter BakkerPeter Bakker

            212




            212

























                0














                This was happening to me also - though maybe not the best route, adding powershell.exe to the list of Windows Defender exclusions sped it up from 20 seconds to < 1 second.



                Using legacy console, purging PSReadLine, and running ngen did not seem to help at all.






                share|improve this answer




























                  0














                  This was happening to me also - though maybe not the best route, adding powershell.exe to the list of Windows Defender exclusions sped it up from 20 seconds to < 1 second.



                  Using legacy console, purging PSReadLine, and running ngen did not seem to help at all.






                  share|improve this answer


























                    0












                    0








                    0







                    This was happening to me also - though maybe not the best route, adding powershell.exe to the list of Windows Defender exclusions sped it up from 20 seconds to < 1 second.



                    Using legacy console, purging PSReadLine, and running ngen did not seem to help at all.






                    share|improve this answer













                    This was happening to me also - though maybe not the best route, adding powershell.exe to the list of Windows Defender exclusions sped it up from 20 seconds to < 1 second.



                    Using legacy console, purging PSReadLine, and running ngen did not seem to help at all.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered yesterday









                    SliverNinja - MSFTSliverNinja - MSFT

                    1588




                    1588























                        -1














                        I had been experiencing the same issue for quite some time until PowerShell started failing on startup with the following error:



                        Exception:
                        System.OutOfMemoryException: Array dimensions exceeded supported range.
                        at System.Collections.Generic.List`1.set_Capacity(Int32 value)
                        at System.Collections.Generic.List`1.EnsureCapacity(Int32 min)
                        at System.Collections.Generic.List`1.Add(T item)
                        at System.IO.File.InternalReadAllLines(String path, Encoding encoding)
                        at Microsoft.PowerShell.PSConsoleReadLine.<ReadHistoryFile>b__67_0()
                        at Microsoft.PowerShell.PSConsoleReadLine.WithHistoryFileMutexDo(Int32 timeout, Action action)
                        at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
                        at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
                        at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
                        -----------------------------------------------------------------------


                        This led me to the existing Github issue: https://github.com/lzybkr/PSReadLine/issues/673



                        I tried deleting history file in ~AppDataRoamingMicrosoftWindowsPowerShellPSReadline which was over 6 GB by then and after that PowerShell console started opening pretty quickly.



                        Maybe the slowness you experience is the PowerShell trying to read a big history file (which is not yet big enough to cause OutOfMemory).






                        share|improve this answer




























                          -1














                          I had been experiencing the same issue for quite some time until PowerShell started failing on startup with the following error:



                          Exception:
                          System.OutOfMemoryException: Array dimensions exceeded supported range.
                          at System.Collections.Generic.List`1.set_Capacity(Int32 value)
                          at System.Collections.Generic.List`1.EnsureCapacity(Int32 min)
                          at System.Collections.Generic.List`1.Add(T item)
                          at System.IO.File.InternalReadAllLines(String path, Encoding encoding)
                          at Microsoft.PowerShell.PSConsoleReadLine.<ReadHistoryFile>b__67_0()
                          at Microsoft.PowerShell.PSConsoleReadLine.WithHistoryFileMutexDo(Int32 timeout, Action action)
                          at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
                          at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
                          at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
                          -----------------------------------------------------------------------


                          This led me to the existing Github issue: https://github.com/lzybkr/PSReadLine/issues/673



                          I tried deleting history file in ~AppDataRoamingMicrosoftWindowsPowerShellPSReadline which was over 6 GB by then and after that PowerShell console started opening pretty quickly.



                          Maybe the slowness you experience is the PowerShell trying to read a big history file (which is not yet big enough to cause OutOfMemory).






                          share|improve this answer


























                            -1












                            -1








                            -1







                            I had been experiencing the same issue for quite some time until PowerShell started failing on startup with the following error:



                            Exception:
                            System.OutOfMemoryException: Array dimensions exceeded supported range.
                            at System.Collections.Generic.List`1.set_Capacity(Int32 value)
                            at System.Collections.Generic.List`1.EnsureCapacity(Int32 min)
                            at System.Collections.Generic.List`1.Add(T item)
                            at System.IO.File.InternalReadAllLines(String path, Encoding encoding)
                            at Microsoft.PowerShell.PSConsoleReadLine.<ReadHistoryFile>b__67_0()
                            at Microsoft.PowerShell.PSConsoleReadLine.WithHistoryFileMutexDo(Int32 timeout, Action action)
                            at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
                            at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
                            at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
                            -----------------------------------------------------------------------


                            This led me to the existing Github issue: https://github.com/lzybkr/PSReadLine/issues/673



                            I tried deleting history file in ~AppDataRoamingMicrosoftWindowsPowerShellPSReadline which was over 6 GB by then and after that PowerShell console started opening pretty quickly.



                            Maybe the slowness you experience is the PowerShell trying to read a big history file (which is not yet big enough to cause OutOfMemory).






                            share|improve this answer













                            I had been experiencing the same issue for quite some time until PowerShell started failing on startup with the following error:



                            Exception:
                            System.OutOfMemoryException: Array dimensions exceeded supported range.
                            at System.Collections.Generic.List`1.set_Capacity(Int32 value)
                            at System.Collections.Generic.List`1.EnsureCapacity(Int32 min)
                            at System.Collections.Generic.List`1.Add(T item)
                            at System.IO.File.InternalReadAllLines(String path, Encoding encoding)
                            at Microsoft.PowerShell.PSConsoleReadLine.<ReadHistoryFile>b__67_0()
                            at Microsoft.PowerShell.PSConsoleReadLine.WithHistoryFileMutexDo(Int32 timeout, Action action)
                            at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
                            at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
                            at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
                            -----------------------------------------------------------------------


                            This led me to the existing Github issue: https://github.com/lzybkr/PSReadLine/issues/673



                            I tried deleting history file in ~AppDataRoamingMicrosoftWindowsPowerShellPSReadline which was over 6 GB by then and after that PowerShell console started opening pretty quickly.



                            Maybe the slowness you experience is the PowerShell trying to read a big history file (which is not yet big enough to cause OutOfMemory).







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Oct 19 '18 at 7:19









                            takemyoxygentakemyoxygen

                            99




                            99






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Super User!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1212442%2fpowershell-slow-starting-on-windows-10%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                                Tribunal Administrativo e Fiscal de Mirandela Referências Menu de...

                                looking for continuous Screen Capture for retroactivly reproducing errors, timeback machineRolling desktop...