netsh error: The process cannot access the file because it is being used by another process












1















It is a server running Windows Server 2016 Essentials. Intuit, in all their infinite wisdom, wanted me to run this command on our file server:



netsh int ipv4 add excludedportrange protocol=udp startport=55368 numberofports=5


The error message I get back is:




The process cannot access the file because it is being used by another process.




So does anyone know what file are we talking about and what process might have it opened?










share|improve this question





























    1















    It is a server running Windows Server 2016 Essentials. Intuit, in all their infinite wisdom, wanted me to run this command on our file server:



    netsh int ipv4 add excludedportrange protocol=udp startport=55368 numberofports=5


    The error message I get back is:




    The process cannot access the file because it is being used by another process.




    So does anyone know what file are we talking about and what process might have it opened?










    share|improve this question



























      1












      1








      1








      It is a server running Windows Server 2016 Essentials. Intuit, in all their infinite wisdom, wanted me to run this command on our file server:



      netsh int ipv4 add excludedportrange protocol=udp startport=55368 numberofports=5


      The error message I get back is:




      The process cannot access the file because it is being used by another process.




      So does anyone know what file are we talking about and what process might have it opened?










      share|improve this question
















      It is a server running Windows Server 2016 Essentials. Intuit, in all their infinite wisdom, wanted me to run this command on our file server:



      netsh int ipv4 add excludedportrange protocol=udp startport=55368 numberofports=5


      The error message I get back is:




      The process cannot access the file because it is being used by another process.




      So does anyone know what file are we talking about and what process might have it opened?







      windows-server-2016 netsh






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 11 '18 at 20:57







      user477799

















      asked Jun 11 '18 at 20:48









      RefurbRefurb

      515




      515






















          3 Answers
          3






          active

          oldest

          votes


















          0














          That command appears to be trying to add exclusions to the dynamic port range for Windows and apps.



          Did you try running it as Administrator? (You can type CMD into the Windows search on the Task Bar, and then right-click on the CMD icon and hit "Run as Administrator.")



          I would recommend simply disabling the Windows Firewall and testing it to see if that solves the issue --- then build back up your security and port exclusions from there.






          share|improve this answer


























          • Well..... that is how I ran it at the command prompt (as administrator). According to Intuit one of their services running on the server and Microsoft's DNS Server are using the same port and this command was supposed to exclude the range in question from being used. Since both services are running on the same server I wouldn't think it should mess with the firewall should it?

            – Refurb
            Jun 11 '18 at 21:07











          • Right.... Ok, did you have the Microsoft DNS Server stopped at the time you ran the command? It would need to be stopped and then restarted after the command has executed successfully (at which point, presumably, it would start on different ports).

            – Your Computer Genius
            Jun 11 '18 at 21:24











          • Haven't tried it yet but their instructions do say to stop both services before issuing the command. I am just very curious as to what and where this file is just in case the command does something detrimental and I need to reverse it by editing the file.

            – Refurb
            Jun 12 '18 at 14:32











          • The command just removes ports from the dynamic range that Windows will use. You should be able to craft a netsh command that reverses it. See support.microsoft.com/en-us/help/929851/…

            – Your Computer Genius
            Jun 12 '18 at 19:49





















          0














          That error happens if you have already excluded those ports. Confusing error message I know.



          Check what you have already using netsh int ipv4 show excludedportrange protocol=udp






          share|improve this answer































            -1














            I was having the same trouble (with the goal of clearing a conflict between DNS and QuickBooks). In the end what seems to have worked was, instead of setting an exclusion range, to set the range to a completely different range.



            I used the following commands and, at least so far, it seems to be working.



            netsh int ipv4 set dynamicport tcp start=10000 num=1000
            netsh int ipv4 set dynamicport udp start=10000 num=1000





            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%2f1330471%2fnetsh-error-the-process-cannot-access-the-file-because-it-is-being-used-by-anot%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









              0














              That command appears to be trying to add exclusions to the dynamic port range for Windows and apps.



              Did you try running it as Administrator? (You can type CMD into the Windows search on the Task Bar, and then right-click on the CMD icon and hit "Run as Administrator.")



              I would recommend simply disabling the Windows Firewall and testing it to see if that solves the issue --- then build back up your security and port exclusions from there.






              share|improve this answer


























              • Well..... that is how I ran it at the command prompt (as administrator). According to Intuit one of their services running on the server and Microsoft's DNS Server are using the same port and this command was supposed to exclude the range in question from being used. Since both services are running on the same server I wouldn't think it should mess with the firewall should it?

                – Refurb
                Jun 11 '18 at 21:07











              • Right.... Ok, did you have the Microsoft DNS Server stopped at the time you ran the command? It would need to be stopped and then restarted after the command has executed successfully (at which point, presumably, it would start on different ports).

                – Your Computer Genius
                Jun 11 '18 at 21:24











              • Haven't tried it yet but their instructions do say to stop both services before issuing the command. I am just very curious as to what and where this file is just in case the command does something detrimental and I need to reverse it by editing the file.

                – Refurb
                Jun 12 '18 at 14:32











              • The command just removes ports from the dynamic range that Windows will use. You should be able to craft a netsh command that reverses it. See support.microsoft.com/en-us/help/929851/…

                – Your Computer Genius
                Jun 12 '18 at 19:49


















              0














              That command appears to be trying to add exclusions to the dynamic port range for Windows and apps.



              Did you try running it as Administrator? (You can type CMD into the Windows search on the Task Bar, and then right-click on the CMD icon and hit "Run as Administrator.")



              I would recommend simply disabling the Windows Firewall and testing it to see if that solves the issue --- then build back up your security and port exclusions from there.






              share|improve this answer


























              • Well..... that is how I ran it at the command prompt (as administrator). According to Intuit one of their services running on the server and Microsoft's DNS Server are using the same port and this command was supposed to exclude the range in question from being used. Since both services are running on the same server I wouldn't think it should mess with the firewall should it?

                – Refurb
                Jun 11 '18 at 21:07











              • Right.... Ok, did you have the Microsoft DNS Server stopped at the time you ran the command? It would need to be stopped and then restarted after the command has executed successfully (at which point, presumably, it would start on different ports).

                – Your Computer Genius
                Jun 11 '18 at 21:24











              • Haven't tried it yet but their instructions do say to stop both services before issuing the command. I am just very curious as to what and where this file is just in case the command does something detrimental and I need to reverse it by editing the file.

                – Refurb
                Jun 12 '18 at 14:32











              • The command just removes ports from the dynamic range that Windows will use. You should be able to craft a netsh command that reverses it. See support.microsoft.com/en-us/help/929851/…

                – Your Computer Genius
                Jun 12 '18 at 19:49
















              0












              0








              0







              That command appears to be trying to add exclusions to the dynamic port range for Windows and apps.



              Did you try running it as Administrator? (You can type CMD into the Windows search on the Task Bar, and then right-click on the CMD icon and hit "Run as Administrator.")



              I would recommend simply disabling the Windows Firewall and testing it to see if that solves the issue --- then build back up your security and port exclusions from there.






              share|improve this answer















              That command appears to be trying to add exclusions to the dynamic port range for Windows and apps.



              Did you try running it as Administrator? (You can type CMD into the Windows search on the Task Bar, and then right-click on the CMD icon and hit "Run as Administrator.")



              I would recommend simply disabling the Windows Firewall and testing it to see if that solves the issue --- then build back up your security and port exclusions from there.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jun 12 '18 at 19:51

























              answered Jun 11 '18 at 20:59









              Your Computer GeniusYour Computer Genius

              136




              136













              • Well..... that is how I ran it at the command prompt (as administrator). According to Intuit one of their services running on the server and Microsoft's DNS Server are using the same port and this command was supposed to exclude the range in question from being used. Since both services are running on the same server I wouldn't think it should mess with the firewall should it?

                – Refurb
                Jun 11 '18 at 21:07











              • Right.... Ok, did you have the Microsoft DNS Server stopped at the time you ran the command? It would need to be stopped and then restarted after the command has executed successfully (at which point, presumably, it would start on different ports).

                – Your Computer Genius
                Jun 11 '18 at 21:24











              • Haven't tried it yet but their instructions do say to stop both services before issuing the command. I am just very curious as to what and where this file is just in case the command does something detrimental and I need to reverse it by editing the file.

                – Refurb
                Jun 12 '18 at 14:32











              • The command just removes ports from the dynamic range that Windows will use. You should be able to craft a netsh command that reverses it. See support.microsoft.com/en-us/help/929851/…

                – Your Computer Genius
                Jun 12 '18 at 19:49





















              • Well..... that is how I ran it at the command prompt (as administrator). According to Intuit one of their services running on the server and Microsoft's DNS Server are using the same port and this command was supposed to exclude the range in question from being used. Since both services are running on the same server I wouldn't think it should mess with the firewall should it?

                – Refurb
                Jun 11 '18 at 21:07











              • Right.... Ok, did you have the Microsoft DNS Server stopped at the time you ran the command? It would need to be stopped and then restarted after the command has executed successfully (at which point, presumably, it would start on different ports).

                – Your Computer Genius
                Jun 11 '18 at 21:24











              • Haven't tried it yet but their instructions do say to stop both services before issuing the command. I am just very curious as to what and where this file is just in case the command does something detrimental and I need to reverse it by editing the file.

                – Refurb
                Jun 12 '18 at 14:32











              • The command just removes ports from the dynamic range that Windows will use. You should be able to craft a netsh command that reverses it. See support.microsoft.com/en-us/help/929851/…

                – Your Computer Genius
                Jun 12 '18 at 19:49



















              Well..... that is how I ran it at the command prompt (as administrator). According to Intuit one of their services running on the server and Microsoft's DNS Server are using the same port and this command was supposed to exclude the range in question from being used. Since both services are running on the same server I wouldn't think it should mess with the firewall should it?

              – Refurb
              Jun 11 '18 at 21:07





              Well..... that is how I ran it at the command prompt (as administrator). According to Intuit one of their services running on the server and Microsoft's DNS Server are using the same port and this command was supposed to exclude the range in question from being used. Since both services are running on the same server I wouldn't think it should mess with the firewall should it?

              – Refurb
              Jun 11 '18 at 21:07













              Right.... Ok, did you have the Microsoft DNS Server stopped at the time you ran the command? It would need to be stopped and then restarted after the command has executed successfully (at which point, presumably, it would start on different ports).

              – Your Computer Genius
              Jun 11 '18 at 21:24





              Right.... Ok, did you have the Microsoft DNS Server stopped at the time you ran the command? It would need to be stopped and then restarted after the command has executed successfully (at which point, presumably, it would start on different ports).

              – Your Computer Genius
              Jun 11 '18 at 21:24













              Haven't tried it yet but their instructions do say to stop both services before issuing the command. I am just very curious as to what and where this file is just in case the command does something detrimental and I need to reverse it by editing the file.

              – Refurb
              Jun 12 '18 at 14:32





              Haven't tried it yet but their instructions do say to stop both services before issuing the command. I am just very curious as to what and where this file is just in case the command does something detrimental and I need to reverse it by editing the file.

              – Refurb
              Jun 12 '18 at 14:32













              The command just removes ports from the dynamic range that Windows will use. You should be able to craft a netsh command that reverses it. See support.microsoft.com/en-us/help/929851/…

              – Your Computer Genius
              Jun 12 '18 at 19:49







              The command just removes ports from the dynamic range that Windows will use. You should be able to craft a netsh command that reverses it. See support.microsoft.com/en-us/help/929851/…

              – Your Computer Genius
              Jun 12 '18 at 19:49















              0














              That error happens if you have already excluded those ports. Confusing error message I know.



              Check what you have already using netsh int ipv4 show excludedportrange protocol=udp






              share|improve this answer




























                0














                That error happens if you have already excluded those ports. Confusing error message I know.



                Check what you have already using netsh int ipv4 show excludedportrange protocol=udp






                share|improve this answer


























                  0












                  0








                  0







                  That error happens if you have already excluded those ports. Confusing error message I know.



                  Check what you have already using netsh int ipv4 show excludedportrange protocol=udp






                  share|improve this answer













                  That error happens if you have already excluded those ports. Confusing error message I know.



                  Check what you have already using netsh int ipv4 show excludedportrange protocol=udp







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 7 at 19:16









                  Dan BuhlerDan Buhler

                  17713




                  17713























                      -1














                      I was having the same trouble (with the goal of clearing a conflict between DNS and QuickBooks). In the end what seems to have worked was, instead of setting an exclusion range, to set the range to a completely different range.



                      I used the following commands and, at least so far, it seems to be working.



                      netsh int ipv4 set dynamicport tcp start=10000 num=1000
                      netsh int ipv4 set dynamicport udp start=10000 num=1000





                      share|improve this answer






























                        -1














                        I was having the same trouble (with the goal of clearing a conflict between DNS and QuickBooks). In the end what seems to have worked was, instead of setting an exclusion range, to set the range to a completely different range.



                        I used the following commands and, at least so far, it seems to be working.



                        netsh int ipv4 set dynamicport tcp start=10000 num=1000
                        netsh int ipv4 set dynamicport udp start=10000 num=1000





                        share|improve this answer




























                          -1












                          -1








                          -1







                          I was having the same trouble (with the goal of clearing a conflict between DNS and QuickBooks). In the end what seems to have worked was, instead of setting an exclusion range, to set the range to a completely different range.



                          I used the following commands and, at least so far, it seems to be working.



                          netsh int ipv4 set dynamicport tcp start=10000 num=1000
                          netsh int ipv4 set dynamicport udp start=10000 num=1000





                          share|improve this answer















                          I was having the same trouble (with the goal of clearing a conflict between DNS and QuickBooks). In the end what seems to have worked was, instead of setting an exclusion range, to set the range to a completely different range.



                          I used the following commands and, at least so far, it seems to be working.



                          netsh int ipv4 set dynamicport tcp start=10000 num=1000
                          netsh int ipv4 set dynamicport udp start=10000 num=1000






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Aug 6 '18 at 13:29









                          robinCTS

                          4,01741527




                          4,01741527










                          answered Aug 6 '18 at 13:08









                          Hinson StephensHinson Stephens

                          1




                          1






























                              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%2f1330471%2fnetsh-error-the-process-cannot-access-the-file-because-it-is-being-used-by-anot%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