PowerShell script exchange
Post Reply
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

Hi Experts,

Getting this below error while we are trying to add vCenter FQDN instead of vCenter IP via powershell

The remote name could not be resolved : 'Veeam.Veeam12.VMware.net'

It was working as fine, and I was able to add the vCenter when I was passing the vCenter IP address. I am getting this error when I am trying to pass the FQDN name of the vCenter.

I just wanted to make sure. Is this expected scenario?

Code: Select all

Connect-VIServer -Server "vCenterIP" -User "Username" -Password "Password" -Force
Kindly, someone confirm me.

Thanks in advance.

Regards
Leo.
mjr.epicfail
Veeam Legend
Posts: 354
Liked: 103 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by mjr.epicfail » 1 person likes this post

Hi Leo,

This looks more like a vSphere question than a Veeam question.
Nonetheless, this should work, did you try to resolve the FQDN via powershell?
VMCE / Veeam Legend 2*
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

@mjr.epicfail

Hello Expert,

Thanks for your reply.

Nothing wrong with vCenter end. I am able to resolve the FQDN. Its reachable and pinging. So I cannot check with VMware.

I am able to add the vCenter IP address via PowerShell instead of FDQN then its working fine without any issue.

I just wanted to know whether it was possible to add FQDN via PowerShell or not. If a Veeam expert like you confirms it, that would be great.

Could you please confirm me?

Code: Select all

Connect-VIServer -Server "Veeam.Veeam12.VMware.net" -User "administrator@vsphere.local" -Password "Welcome@123" -Force
Regards
Leo
mjr.epicfail
Veeam Legend
Posts: 354
Liked: 103 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by mjr.epicfail » 1 person likes this post

Hi Leo,

It was not meant for the vcenter end, just on the server you are trying the connection *FROM*.
I just checked the code and I can indeed login into vcenter with that codeline.

I really think there is a DNS issue on the "FROM" machine you are testing this on.
VMCE / Veeam Legend 2*
tyler.jurgens
Veeam Legend
Posts: 402
Liked: 229 times
Joined: Apr 11, 2023 1:18 pm
Full Name: Tyler Jurgens
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by tyler.jurgens » 2 people like this post

Leo0601 wrote: Nov 28, 2024 5:26 pm

Code: Select all

Connect-VIServer -Server "Veeam.Veeam12.VMware.net" -User "administrator@vsphere.local" -Password "Welcome@123" -Force
Where are you getting that FQDN from?

Code: Select all

Veeam.Veeam12.VMware.net

It doesn't look like a proper FQDN for a vCenter you own. VMware.net is owned by VMware (now Broadcom), so unless you work for them, this shouldn't be used. If you do work for Broadcom (*waves*) you probably have much better internal resources for connecting with VMware's PowerCLI than we do on the Veeam R&D Forums. :lol:

If you are using that FQDN internally:
a) You really shouldn't be
b) You would have some DNS server responding to vmware.net queries internal to your organization, but the system you are connecting from likely isn't resolving that FQDN against your internal DNS server. That's not an FQDN that resolves publicly, so unless the machine you are using to run that powershell code can run DNS lookups against your internal DNS server, this could never work.
c) See a).
Tyler Jurgens
Veeam Legend x3 | vExpert ** | VMCE | VCP 2020 | Tanzu Vanguard | VUG Canada Leader | VMUG Calgary Leader
Blog: https://explosive.cloud
Twitter: @Tyler_Jurgens BlueSky: @explosive.cloud
jhoughes
Veeam Vanguard
Posts: 282
Liked: 113 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Castle Rock, CO
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by jhoughes »

Leo0601 wrote: Nov 28, 2024 1:52 pm Hi Experts,

Getting this below error while we are trying to add vCenter FQDN instead of vCenter IP via powershell

The remote name could not be resolved : 'Veeam.Veeam12.VMware.net'

It was working as fine, and I was able to add the vCenter when I was passing the vCenter IP address. I am getting this error when I am trying to pass the FQDN name of the vCenter.

I just wanted to make sure. Is this expected scenario?

Code: Select all

Connect-VIServer -Server "vCenterIP" -User "Username" -Password "Password" -Force
Kindly, someone confirm me.

Thanks in advance.

Regards
Leo.
Are you intending to connect or the vCenter server from PowerCLI, and NOT the Veeam cmdlets?

Either way, I'd start with the advice of Tyler above.
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

@mjr.epicfail

First of all, I would like to apologize you for mentioning the wrong code.

actual code which I am trying to add is below.

Code: Select all

Add-VBRvCenter -Name "Veeam.Veeam12.VMware.net" -User "administrator@vsphere.local" -Password "Welcome@123" -Force
Thanks much for the reply. Yes, you are right. Its related with the DNS.

I found the issue and fixed it.

There is a host file which is present in all the windows server.

Path: C:\Windows\System32\drivers\etc

In that host file we have to add the FQDN of the vCenter and save it.

Then we can able to add the vCenter.

I given thumbs-up for your replies. Thanks again.
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

@tyler.jurgens

Hi Tyler,

There is no problem with the FQDN.

Thats fine.

Thanks for the explanation. As you mentioned, Its related to the DNS only.

I found the issue and fixed it.

I gave like for your reply.
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

@jhoughes

I am sorry for the wrong code.

Below is my code. I found the issue and fixed it.

Code: Select all

Add-VBRvCenter -Name "Veeam.Veeam12.VMware.net" -User "administrator@vsphere.local" -Password "Welcome@123" -Force
Thanks much for the quick response.
tyler.jurgens
Veeam Legend
Posts: 402
Liked: 229 times
Joined: Apr 11, 2023 1:18 pm
Full Name: Tyler Jurgens
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by tyler.jurgens » 3 people like this post

Leo0601 wrote: Nov 28, 2024 10:13 pm There is no problem with the FQDN.
I think we're going to need to agree to disagree on that one. You should never be using a FQDN for a valid TLD that you do not own. No good can ever come from it.
Tyler Jurgens
Veeam Legend x3 | vExpert ** | VMCE | VCP 2020 | Tanzu Vanguard | VUG Canada Leader | VMUG Calgary Leader
Blog: https://explosive.cloud
Twitter: @Tyler_Jurgens BlueSky: @explosive.cloud
mjr.epicfail
Veeam Legend
Posts: 354
Liked: 103 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by mjr.epicfail » 1 person likes this post

I was operating under the notion that these were replacement items (masking the real fqdn and user and pass).
But if it isn't, then yes, DO NOT USE INVALID FQDN's.
VMCE / Veeam Legend 2*
Leo0601
Enthusiast
Posts: 88
Liked: 8 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: The remote name could not be resolved : Getting this error while we are trying to add vCenter FQDN via powershell

Post by Leo0601 »

Hi Experts,

As you guys mentioned, it was a DNS issue.

That was a miss from our end. Which we havent added FDQN in the windows host file earlier (C:\Windows\System32\drivers\etc)

After I added, everything was working as expected.

Regards
Leo.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests