Powershell Test-NetConnection “Name resolution of [domain] failed” errorEcho equivalent in PowerShell for script testingHow to correctly ignore Import-Module errors in PowerShellAzure Powershell PortAzure PowerShell Error: while using Start-AzureSqlDatabaseCopy it throws exception with Error Code: NotFoundWinRM error while connecting to raspberry pi through PowerShell on Windows 10Azure Powershell cannot loginError while connecting to Powershell using C#PowerShell cmdlet Test-NetConnection not availablePowerShell Stopping and Starting Services with Server names masked by DNS AliasPowershell Running MSTest.exe with multiple tests - how to output only failed tests?

Was Apollo 13 radio blackout on reentry longer than expected?

Is straight-up writing someone's opinions telling?

Is Error correction and detection can be done with out adding extra bits?

Random piece of plastic

How to belay quickly ascending top-rope climbers?

How to find location on Cambridge-Mildenhall railway that still has tracks/rails?

Finding all possible pairs of square numbers in an array

At which point can a system be compromised when downloading archived data from an untrusted source?

How to not confuse readers with simultaneous events?

Is it possible to have two words with the same particle in a sentence?

Demographic consequences of closed loop reincarnation

Why is the Intel 8086 CPU called a 16-bit CPU?

Did 007 exist before James Bond?

Can a dragon's breath weapon pass through Leomund's Tiny Hut?

An entire function all whose forward orbits are bounded

Why won't some unicode characters print to my terminal?

Strategy to pay off revolving debt while building reserve savings fund?

Is the Münchhausen trilemma really a trilemma?

What happens if a company buys back all of its shares?

Alphanumeric Line and Curve Counting

What details should I consider before agreeing for part of my salary to be 'retained' by employer?

Time signature inconsistent

Everyone but three

Who determines when road center lines are solid or dashed?



Powershell Test-NetConnection “Name resolution of [domain] failed” error


Echo equivalent in PowerShell for script testingHow to correctly ignore Import-Module errors in PowerShellAzure Powershell PortAzure PowerShell Error: while using Start-AzureSqlDatabaseCopy it throws exception with Error Code: NotFoundWinRM error while connecting to raspberry pi through PowerShell on Windows 10Azure Powershell cannot loginError while connecting to Powershell using C#PowerShell cmdlet Test-NetConnection not availablePowerShell Stopping and Starting Services with Server names masked by DNS AliasPowershell Running MSTest.exe with multiple tests - how to output only failed tests?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm trying to connect to connect to an Azure Files share using Powershell, but it's failing, so am going through each command to try and locate the issue. Searching online, it seems that I need to verify port 445 is open (which my Bitdefender firewall has been configured to allow).



I ran this command in Azure Powershell to test:



Test-NetConnection -Port 445 -ComputerName https://myazurefileshare.file.core.windows.net


The error was:




WARNING: Name resolution of https://myazurefileshare.file.core.windows.net failed




I then opted for something more generic, using port 80 as a test (sorry Microsoft):



Test-NetConnection -Port 80 -ComputerName https://www.microsoft.com


Surprisingly, this also failed:




WARNING: Name resolution of https://www.microsoft.com failed




I'm new to Powershell, so please excuse any RTFM oversights. However, can anyone please shed any light on this? I'm simply trying to verify that port 445 is open.










share|improve this question






















  • have you tried Test-NetConnection -ComputerName "www.google.com" from that server and checked that issue is not related to the dns server . You can assign 8.8.8.8 as a secondary dns in the server and see what is the output.

    – Ranadip Dutta
    Mar 26 at 9:26












  • Okay thanks. That command has worked okay

    – EvilDr
    Mar 26 at 9:29











  • Can you test it on a machine within your local network ?

    – Fourat
    Mar 26 at 9:35











  • So that means there is no issue on the command or the connection. It is pure the site that you are using and the corresponding DNS resolution. Try adding an A record in the resolv.conf or adding the entry in the hosts file and see. Also ignore the warning that you are getting for microsoft.com -- that is a separate thing. Could be a microsoft forwarder thing.

    – Ranadip Dutta
    Mar 26 at 9:36







  • 1





    Okay I've found a solution, and will post an answer after my meeting finishes in a couple of hours. Thank you kindly for your assistance

    – EvilDr
    Mar 26 at 9:49

















1















I'm trying to connect to connect to an Azure Files share using Powershell, but it's failing, so am going through each command to try and locate the issue. Searching online, it seems that I need to verify port 445 is open (which my Bitdefender firewall has been configured to allow).



I ran this command in Azure Powershell to test:



Test-NetConnection -Port 445 -ComputerName https://myazurefileshare.file.core.windows.net


The error was:




WARNING: Name resolution of https://myazurefileshare.file.core.windows.net failed




I then opted for something more generic, using port 80 as a test (sorry Microsoft):



Test-NetConnection -Port 80 -ComputerName https://www.microsoft.com


Surprisingly, this also failed:




WARNING: Name resolution of https://www.microsoft.com failed




I'm new to Powershell, so please excuse any RTFM oversights. However, can anyone please shed any light on this? I'm simply trying to verify that port 445 is open.










share|improve this question






















  • have you tried Test-NetConnection -ComputerName "www.google.com" from that server and checked that issue is not related to the dns server . You can assign 8.8.8.8 as a secondary dns in the server and see what is the output.

    – Ranadip Dutta
    Mar 26 at 9:26












  • Okay thanks. That command has worked okay

    – EvilDr
    Mar 26 at 9:29











  • Can you test it on a machine within your local network ?

    – Fourat
    Mar 26 at 9:35











  • So that means there is no issue on the command or the connection. It is pure the site that you are using and the corresponding DNS resolution. Try adding an A record in the resolv.conf or adding the entry in the hosts file and see. Also ignore the warning that you are getting for microsoft.com -- that is a separate thing. Could be a microsoft forwarder thing.

    – Ranadip Dutta
    Mar 26 at 9:36







  • 1





    Okay I've found a solution, and will post an answer after my meeting finishes in a couple of hours. Thank you kindly for your assistance

    – EvilDr
    Mar 26 at 9:49













1












1








1








I'm trying to connect to connect to an Azure Files share using Powershell, but it's failing, so am going through each command to try and locate the issue. Searching online, it seems that I need to verify port 445 is open (which my Bitdefender firewall has been configured to allow).



I ran this command in Azure Powershell to test:



Test-NetConnection -Port 445 -ComputerName https://myazurefileshare.file.core.windows.net


The error was:




WARNING: Name resolution of https://myazurefileshare.file.core.windows.net failed




I then opted for something more generic, using port 80 as a test (sorry Microsoft):



Test-NetConnection -Port 80 -ComputerName https://www.microsoft.com


Surprisingly, this also failed:




WARNING: Name resolution of https://www.microsoft.com failed




I'm new to Powershell, so please excuse any RTFM oversights. However, can anyone please shed any light on this? I'm simply trying to verify that port 445 is open.










share|improve this question














I'm trying to connect to connect to an Azure Files share using Powershell, but it's failing, so am going through each command to try and locate the issue. Searching online, it seems that I need to verify port 445 is open (which my Bitdefender firewall has been configured to allow).



I ran this command in Azure Powershell to test:



Test-NetConnection -Port 445 -ComputerName https://myazurefileshare.file.core.windows.net


The error was:




WARNING: Name resolution of https://myazurefileshare.file.core.windows.net failed




I then opted for something more generic, using port 80 as a test (sorry Microsoft):



Test-NetConnection -Port 80 -ComputerName https://www.microsoft.com


Surprisingly, this also failed:




WARNING: Name resolution of https://www.microsoft.com failed




I'm new to Powershell, so please excuse any RTFM oversights. However, can anyone please shed any light on this? I'm simply trying to verify that port 445 is open.







powershell azure-powershell






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 9:23









EvilDrEvilDr

4,1927 gold badges45 silver badges90 bronze badges




4,1927 gold badges45 silver badges90 bronze badges












  • have you tried Test-NetConnection -ComputerName "www.google.com" from that server and checked that issue is not related to the dns server . You can assign 8.8.8.8 as a secondary dns in the server and see what is the output.

    – Ranadip Dutta
    Mar 26 at 9:26












  • Okay thanks. That command has worked okay

    – EvilDr
    Mar 26 at 9:29











  • Can you test it on a machine within your local network ?

    – Fourat
    Mar 26 at 9:35











  • So that means there is no issue on the command or the connection. It is pure the site that you are using and the corresponding DNS resolution. Try adding an A record in the resolv.conf or adding the entry in the hosts file and see. Also ignore the warning that you are getting for microsoft.com -- that is a separate thing. Could be a microsoft forwarder thing.

    – Ranadip Dutta
    Mar 26 at 9:36







  • 1





    Okay I've found a solution, and will post an answer after my meeting finishes in a couple of hours. Thank you kindly for your assistance

    – EvilDr
    Mar 26 at 9:49

















  • have you tried Test-NetConnection -ComputerName "www.google.com" from that server and checked that issue is not related to the dns server . You can assign 8.8.8.8 as a secondary dns in the server and see what is the output.

    – Ranadip Dutta
    Mar 26 at 9:26












  • Okay thanks. That command has worked okay

    – EvilDr
    Mar 26 at 9:29











  • Can you test it on a machine within your local network ?

    – Fourat
    Mar 26 at 9:35











  • So that means there is no issue on the command or the connection. It is pure the site that you are using and the corresponding DNS resolution. Try adding an A record in the resolv.conf or adding the entry in the hosts file and see. Also ignore the warning that you are getting for microsoft.com -- that is a separate thing. Could be a microsoft forwarder thing.

    – Ranadip Dutta
    Mar 26 at 9:36







  • 1





    Okay I've found a solution, and will post an answer after my meeting finishes in a couple of hours. Thank you kindly for your assistance

    – EvilDr
    Mar 26 at 9:49
















have you tried Test-NetConnection -ComputerName "www.google.com" from that server and checked that issue is not related to the dns server . You can assign 8.8.8.8 as a secondary dns in the server and see what is the output.

– Ranadip Dutta
Mar 26 at 9:26






have you tried Test-NetConnection -ComputerName "www.google.com" from that server and checked that issue is not related to the dns server . You can assign 8.8.8.8 as a secondary dns in the server and see what is the output.

– Ranadip Dutta
Mar 26 at 9:26














Okay thanks. That command has worked okay

– EvilDr
Mar 26 at 9:29





Okay thanks. That command has worked okay

– EvilDr
Mar 26 at 9:29













Can you test it on a machine within your local network ?

– Fourat
Mar 26 at 9:35





Can you test it on a machine within your local network ?

– Fourat
Mar 26 at 9:35













So that means there is no issue on the command or the connection. It is pure the site that you are using and the corresponding DNS resolution. Try adding an A record in the resolv.conf or adding the entry in the hosts file and see. Also ignore the warning that you are getting for microsoft.com -- that is a separate thing. Could be a microsoft forwarder thing.

– Ranadip Dutta
Mar 26 at 9:36






So that means there is no issue on the command or the connection. It is pure the site that you are using and the corresponding DNS resolution. Try adding an A record in the resolv.conf or adding the entry in the hosts file and see. Also ignore the warning that you are getting for microsoft.com -- that is a separate thing. Could be a microsoft forwarder thing.

– Ranadip Dutta
Mar 26 at 9:36





1




1





Okay I've found a solution, and will post an answer after my meeting finishes in a couple of hours. Thank you kindly for your assistance

– EvilDr
Mar 26 at 9:49





Okay I've found a solution, and will post an answer after my meeting finishes in a couple of hours. Thank you kindly for your assistance

– EvilDr
Mar 26 at 9:49












2 Answers
2






active

oldest

votes


















1














The original error properly happens because you have typed the wrong format of the parameter -ComputerName for use Test-NetConnection. The ComputerName specifies the Domain Name System (DNS) name or IP address of the target computer.



In this case, the computer name should be an FQDN of your storage account. So you could use Test-NetConnection -Port 445 -ComputerName somestoragexxx.file.core.windows.net to verify the port 445.



Test result on my side, name resolution works successfully but TCP 445 connection has a failure.
enter image description here



The same test result as the script MS provided.
enter image description here






share|improve this answer
































    0














    It turns out the port was open after all (so cue another question later...). Microsoft have a troubleshooting script which is way more powerful at mounting the drive than the default script available within the Azure Files "Connect" link, see Troubleshooting tool for Azure Files mounting errors on Windows.



    I saved AzFileDiagnostics.ps1 to my desktop for the purposes of the following example. Sadly it won't run without unblocking first because it's not digitally signed, so the full Powershell script I had to run was:



    > Unblock-File -Path "C:UsersMyNameDesktopAzFileDiagnostics.ps1"
    > C:UsersMyNameDesktopAzFileDiagnostics.ps1


    The script then presents various parameter prompts that you need to complete, such as the storage name, etc. However, the key check is the port check - this returned okay for me:




    ======Validate Storage Account Name resolution

    [OK]: Storage Account Name myazurefileshare.file.core.windows.net is
    resolved to 51.140.232.124

    ======Validate port 445 reachability over Storage Account IP 51.140.232.124

    [OK]: Connection attempt succeeds - Port is open

    [OK]: Validation steps do not return any errors






    share|improve this answer

























      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      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%2fstackoverflow.com%2fquestions%2f55353601%2fpowershell-test-netconnection-name-resolution-of-domain-failed-error%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      The original error properly happens because you have typed the wrong format of the parameter -ComputerName for use Test-NetConnection. The ComputerName specifies the Domain Name System (DNS) name or IP address of the target computer.



      In this case, the computer name should be an FQDN of your storage account. So you could use Test-NetConnection -Port 445 -ComputerName somestoragexxx.file.core.windows.net to verify the port 445.



      Test result on my side, name resolution works successfully but TCP 445 connection has a failure.
      enter image description here



      The same test result as the script MS provided.
      enter image description here






      share|improve this answer





























        1














        The original error properly happens because you have typed the wrong format of the parameter -ComputerName for use Test-NetConnection. The ComputerName specifies the Domain Name System (DNS) name or IP address of the target computer.



        In this case, the computer name should be an FQDN of your storage account. So you could use Test-NetConnection -Port 445 -ComputerName somestoragexxx.file.core.windows.net to verify the port 445.



        Test result on my side, name resolution works successfully but TCP 445 connection has a failure.
        enter image description here



        The same test result as the script MS provided.
        enter image description here






        share|improve this answer



























          1












          1








          1







          The original error properly happens because you have typed the wrong format of the parameter -ComputerName for use Test-NetConnection. The ComputerName specifies the Domain Name System (DNS) name or IP address of the target computer.



          In this case, the computer name should be an FQDN of your storage account. So you could use Test-NetConnection -Port 445 -ComputerName somestoragexxx.file.core.windows.net to verify the port 445.



          Test result on my side, name resolution works successfully but TCP 445 connection has a failure.
          enter image description here



          The same test result as the script MS provided.
          enter image description here






          share|improve this answer















          The original error properly happens because you have typed the wrong format of the parameter -ComputerName for use Test-NetConnection. The ComputerName specifies the Domain Name System (DNS) name or IP address of the target computer.



          In this case, the computer name should be an FQDN of your storage account. So you could use Test-NetConnection -Port 445 -ComputerName somestoragexxx.file.core.windows.net to verify the port 445.



          Test result on my side, name resolution works successfully but TCP 445 connection has a failure.
          enter image description here



          The same test result as the script MS provided.
          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 27 at 6:17

























          answered Mar 27 at 6:10









          Nancy XiongNancy Xiong

          6,1301 gold badge2 silver badges11 bronze badges




          6,1301 gold badge2 silver badges11 bronze badges























              0














              It turns out the port was open after all (so cue another question later...). Microsoft have a troubleshooting script which is way more powerful at mounting the drive than the default script available within the Azure Files "Connect" link, see Troubleshooting tool for Azure Files mounting errors on Windows.



              I saved AzFileDiagnostics.ps1 to my desktop for the purposes of the following example. Sadly it won't run without unblocking first because it's not digitally signed, so the full Powershell script I had to run was:



              > Unblock-File -Path "C:UsersMyNameDesktopAzFileDiagnostics.ps1"
              > C:UsersMyNameDesktopAzFileDiagnostics.ps1


              The script then presents various parameter prompts that you need to complete, such as the storage name, etc. However, the key check is the port check - this returned okay for me:




              ======Validate Storage Account Name resolution

              [OK]: Storage Account Name myazurefileshare.file.core.windows.net is
              resolved to 51.140.232.124

              ======Validate port 445 reachability over Storage Account IP 51.140.232.124

              [OK]: Connection attempt succeeds - Port is open

              [OK]: Validation steps do not return any errors






              share|improve this answer



























                0














                It turns out the port was open after all (so cue another question later...). Microsoft have a troubleshooting script which is way more powerful at mounting the drive than the default script available within the Azure Files "Connect" link, see Troubleshooting tool for Azure Files mounting errors on Windows.



                I saved AzFileDiagnostics.ps1 to my desktop for the purposes of the following example. Sadly it won't run without unblocking first because it's not digitally signed, so the full Powershell script I had to run was:



                > Unblock-File -Path "C:UsersMyNameDesktopAzFileDiagnostics.ps1"
                > C:UsersMyNameDesktopAzFileDiagnostics.ps1


                The script then presents various parameter prompts that you need to complete, such as the storage name, etc. However, the key check is the port check - this returned okay for me:




                ======Validate Storage Account Name resolution

                [OK]: Storage Account Name myazurefileshare.file.core.windows.net is
                resolved to 51.140.232.124

                ======Validate port 445 reachability over Storage Account IP 51.140.232.124

                [OK]: Connection attempt succeeds - Port is open

                [OK]: Validation steps do not return any errors






                share|improve this answer

























                  0












                  0








                  0







                  It turns out the port was open after all (so cue another question later...). Microsoft have a troubleshooting script which is way more powerful at mounting the drive than the default script available within the Azure Files "Connect" link, see Troubleshooting tool for Azure Files mounting errors on Windows.



                  I saved AzFileDiagnostics.ps1 to my desktop for the purposes of the following example. Sadly it won't run without unblocking first because it's not digitally signed, so the full Powershell script I had to run was:



                  > Unblock-File -Path "C:UsersMyNameDesktopAzFileDiagnostics.ps1"
                  > C:UsersMyNameDesktopAzFileDiagnostics.ps1


                  The script then presents various parameter prompts that you need to complete, such as the storage name, etc. However, the key check is the port check - this returned okay for me:




                  ======Validate Storage Account Name resolution

                  [OK]: Storage Account Name myazurefileshare.file.core.windows.net is
                  resolved to 51.140.232.124

                  ======Validate port 445 reachability over Storage Account IP 51.140.232.124

                  [OK]: Connection attempt succeeds - Port is open

                  [OK]: Validation steps do not return any errors






                  share|improve this answer













                  It turns out the port was open after all (so cue another question later...). Microsoft have a troubleshooting script which is way more powerful at mounting the drive than the default script available within the Azure Files "Connect" link, see Troubleshooting tool for Azure Files mounting errors on Windows.



                  I saved AzFileDiagnostics.ps1 to my desktop for the purposes of the following example. Sadly it won't run without unblocking first because it's not digitally signed, so the full Powershell script I had to run was:



                  > Unblock-File -Path "C:UsersMyNameDesktopAzFileDiagnostics.ps1"
                  > C:UsersMyNameDesktopAzFileDiagnostics.ps1


                  The script then presents various parameter prompts that you need to complete, such as the storage name, etc. However, the key check is the port check - this returned okay for me:




                  ======Validate Storage Account Name resolution

                  [OK]: Storage Account Name myazurefileshare.file.core.windows.net is
                  resolved to 51.140.232.124

                  ======Validate port 445 reachability over Storage Account IP 51.140.232.124

                  [OK]: Connection attempt succeeds - Port is open

                  [OK]: Validation steps do not return any errors







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 26 at 11:05









                  EvilDrEvilDr

                  4,1927 gold badges45 silver badges90 bronze badges




                  4,1927 gold badges45 silver badges90 bronze badges



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • 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%2fstackoverflow.com%2fquestions%2f55353601%2fpowershell-test-netconnection-name-resolution-of-domain-failed-error%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

                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                      용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                      155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해