PowerShell 64-bit hanging on new machine











up vote
0
down vote

favorite












I just got a new computer with plenty of horsepower and its works fast everywhere except PowerShell. Some of the symptoms, which seem to be consistent:




  • Opening PowerShell shows the copyright info and hangs there for 2 minutes before showing the prompt.

  • I start typing a command and it takes almost a minute for the text to appear

  • Once the text appears I can modify the command and it's responsive.

  • I enter a simple command such as echo 'hello' and hit enter, it takes about 45 seconds for 'hello' to appear on the screen and another 45 seconds to return to the prompt.

  • Once at the prompt it's responsive again.

  • Run the dir command in my home directory (few files/folders), about 2:30 before listing the directory, another 15 seconds to go back to the prompt.

  • I have plenty of memory left and CPU is near idle while it's hanging.


Some attempted troubleshooting:




  • PowerShell ISE: Takes about 5 minutes to get to prompt.

  • PowerShell ISE (x86): It works!

  • PowerShell legacy console: No change.

  • Opening up a regular command line and running powershell -NoProfile: No change.

  • sfc /scannow: No problems found.

  • Disable network connections: No change.

  • Run Sysinternals procmon: Nothing obvious, but it always seems to hang right after some of the "Thread Exit" operations.

  • Look at thread stacks in Sysinternals procexp: When it's hanging the main thread is always at ntdll.dll ZwWaitForMultipleObjects.

  • Uninstall WSL/Hyper-V: No change.

  • Enable WinRM (winrm quickconfig): The service starts, but then it can't connect.


    • I can see port 5985 is being listened to by PID 4 when the service is started.

    • The Windows Firewall has the two "Windows Remote Management (HTTP-In)" entries for port 5985 (allow any remote address when in a private network/profile).

    • I can successfully telnet localhost 5985

    • After the WinRM service starts it takes about 7 minutes for it to respond with:





WSManFault
...



Error number: -2144108250 0x80338126
WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the
network, and that a firewall exception for the WinRM service is
enabled and allows access from this computer. By default, the WinRM
firewall exception for public profiles limits access to remote
computers within the same local subnet.




The consistency in the delays makes me think there is some type of attempted connection and timeout, but I'm at a loss as to what that may be. Any gurus out there with ideas?










share|improve this question




























    up vote
    0
    down vote

    favorite












    I just got a new computer with plenty of horsepower and its works fast everywhere except PowerShell. Some of the symptoms, which seem to be consistent:




    • Opening PowerShell shows the copyright info and hangs there for 2 minutes before showing the prompt.

    • I start typing a command and it takes almost a minute for the text to appear

    • Once the text appears I can modify the command and it's responsive.

    • I enter a simple command such as echo 'hello' and hit enter, it takes about 45 seconds for 'hello' to appear on the screen and another 45 seconds to return to the prompt.

    • Once at the prompt it's responsive again.

    • Run the dir command in my home directory (few files/folders), about 2:30 before listing the directory, another 15 seconds to go back to the prompt.

    • I have plenty of memory left and CPU is near idle while it's hanging.


    Some attempted troubleshooting:




    • PowerShell ISE: Takes about 5 minutes to get to prompt.

    • PowerShell ISE (x86): It works!

    • PowerShell legacy console: No change.

    • Opening up a regular command line and running powershell -NoProfile: No change.

    • sfc /scannow: No problems found.

    • Disable network connections: No change.

    • Run Sysinternals procmon: Nothing obvious, but it always seems to hang right after some of the "Thread Exit" operations.

    • Look at thread stacks in Sysinternals procexp: When it's hanging the main thread is always at ntdll.dll ZwWaitForMultipleObjects.

    • Uninstall WSL/Hyper-V: No change.

    • Enable WinRM (winrm quickconfig): The service starts, but then it can't connect.


      • I can see port 5985 is being listened to by PID 4 when the service is started.

      • The Windows Firewall has the two "Windows Remote Management (HTTP-In)" entries for port 5985 (allow any remote address when in a private network/profile).

      • I can successfully telnet localhost 5985

      • After the WinRM service starts it takes about 7 minutes for it to respond with:





    WSManFault
    ...



    Error number: -2144108250 0x80338126
    WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the
    network, and that a firewall exception for the WinRM service is
    enabled and allows access from this computer. By default, the WinRM
    firewall exception for public profiles limits access to remote
    computers within the same local subnet.




    The consistency in the delays makes me think there is some type of attempted connection and timeout, but I'm at a loss as to what that may be. Any gurus out there with ideas?










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I just got a new computer with plenty of horsepower and its works fast everywhere except PowerShell. Some of the symptoms, which seem to be consistent:




      • Opening PowerShell shows the copyright info and hangs there for 2 minutes before showing the prompt.

      • I start typing a command and it takes almost a minute for the text to appear

      • Once the text appears I can modify the command and it's responsive.

      • I enter a simple command such as echo 'hello' and hit enter, it takes about 45 seconds for 'hello' to appear on the screen and another 45 seconds to return to the prompt.

      • Once at the prompt it's responsive again.

      • Run the dir command in my home directory (few files/folders), about 2:30 before listing the directory, another 15 seconds to go back to the prompt.

      • I have plenty of memory left and CPU is near idle while it's hanging.


      Some attempted troubleshooting:




      • PowerShell ISE: Takes about 5 minutes to get to prompt.

      • PowerShell ISE (x86): It works!

      • PowerShell legacy console: No change.

      • Opening up a regular command line and running powershell -NoProfile: No change.

      • sfc /scannow: No problems found.

      • Disable network connections: No change.

      • Run Sysinternals procmon: Nothing obvious, but it always seems to hang right after some of the "Thread Exit" operations.

      • Look at thread stacks in Sysinternals procexp: When it's hanging the main thread is always at ntdll.dll ZwWaitForMultipleObjects.

      • Uninstall WSL/Hyper-V: No change.

      • Enable WinRM (winrm quickconfig): The service starts, but then it can't connect.


        • I can see port 5985 is being listened to by PID 4 when the service is started.

        • The Windows Firewall has the two "Windows Remote Management (HTTP-In)" entries for port 5985 (allow any remote address when in a private network/profile).

        • I can successfully telnet localhost 5985

        • After the WinRM service starts it takes about 7 minutes for it to respond with:





      WSManFault
      ...



      Error number: -2144108250 0x80338126
      WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the
      network, and that a firewall exception for the WinRM service is
      enabled and allows access from this computer. By default, the WinRM
      firewall exception for public profiles limits access to remote
      computers within the same local subnet.




      The consistency in the delays makes me think there is some type of attempted connection and timeout, but I'm at a loss as to what that may be. Any gurus out there with ideas?










      share|improve this question















      I just got a new computer with plenty of horsepower and its works fast everywhere except PowerShell. Some of the symptoms, which seem to be consistent:




      • Opening PowerShell shows the copyright info and hangs there for 2 minutes before showing the prompt.

      • I start typing a command and it takes almost a minute for the text to appear

      • Once the text appears I can modify the command and it's responsive.

      • I enter a simple command such as echo 'hello' and hit enter, it takes about 45 seconds for 'hello' to appear on the screen and another 45 seconds to return to the prompt.

      • Once at the prompt it's responsive again.

      • Run the dir command in my home directory (few files/folders), about 2:30 before listing the directory, another 15 seconds to go back to the prompt.

      • I have plenty of memory left and CPU is near idle while it's hanging.


      Some attempted troubleshooting:




      • PowerShell ISE: Takes about 5 minutes to get to prompt.

      • PowerShell ISE (x86): It works!

      • PowerShell legacy console: No change.

      • Opening up a regular command line and running powershell -NoProfile: No change.

      • sfc /scannow: No problems found.

      • Disable network connections: No change.

      • Run Sysinternals procmon: Nothing obvious, but it always seems to hang right after some of the "Thread Exit" operations.

      • Look at thread stacks in Sysinternals procexp: When it's hanging the main thread is always at ntdll.dll ZwWaitForMultipleObjects.

      • Uninstall WSL/Hyper-V: No change.

      • Enable WinRM (winrm quickconfig): The service starts, but then it can't connect.


        • I can see port 5985 is being listened to by PID 4 when the service is started.

        • The Windows Firewall has the two "Windows Remote Management (HTTP-In)" entries for port 5985 (allow any remote address when in a private network/profile).

        • I can successfully telnet localhost 5985

        • After the WinRM service starts it takes about 7 minutes for it to respond with:





      WSManFault
      ...



      Error number: -2144108250 0x80338126
      WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the
      network, and that a firewall exception for the WinRM service is
      enabled and allows access from this computer. By default, the WinRM
      firewall exception for public profiles limits access to remote
      computers within the same local subnet.




      The consistency in the delays makes me think there is some type of attempted connection and timeout, but I'm at a loss as to what that may be. Any gurus out there with ideas?







      windows-10-v1803 powershell-5.0






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 at 1:00

























      asked Nov 21 at 4:48









      Nelson Rothermel

      1042




      1042






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Thanks to the antivirus comment at https://stackoverflow.com/questions/45021585/powershell-hangs-on-launch! I had Bitdefender Antivirus installed. Disabling it didn't fix the problem, but uninstalling did. I tried reinstalling and the problem reappeared. Adding all of C: to the exclusion list did not fix the issue.






          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',
            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%2f1377171%2fpowershell-64-bit-hanging-on-new-machine%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Thanks to the antivirus comment at https://stackoverflow.com/questions/45021585/powershell-hangs-on-launch! I had Bitdefender Antivirus installed. Disabling it didn't fix the problem, but uninstalling did. I tried reinstalling and the problem reappeared. Adding all of C: to the exclusion list did not fix the issue.






            share|improve this answer

























              up vote
              0
              down vote













              Thanks to the antivirus comment at https://stackoverflow.com/questions/45021585/powershell-hangs-on-launch! I had Bitdefender Antivirus installed. Disabling it didn't fix the problem, but uninstalling did. I tried reinstalling and the problem reappeared. Adding all of C: to the exclusion list did not fix the issue.






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                Thanks to the antivirus comment at https://stackoverflow.com/questions/45021585/powershell-hangs-on-launch! I had Bitdefender Antivirus installed. Disabling it didn't fix the problem, but uninstalling did. I tried reinstalling and the problem reappeared. Adding all of C: to the exclusion list did not fix the issue.






                share|improve this answer












                Thanks to the antivirus comment at https://stackoverflow.com/questions/45021585/powershell-hangs-on-launch! I had Bitdefender Antivirus installed. Disabling it didn't fix the problem, but uninstalling did. I tried reinstalling and the problem reappeared. Adding all of C: to the exclusion list did not fix the issue.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 22 at 0:55









                Nelson Rothermel

                1042




                1042






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377171%2fpowershell-64-bit-hanging-on-new-machine%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

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    RAC Tourist Trophy