简体   繁体   English

通过公共 IP 地址获取 Azure FQDN(DNS 名称)

[英]Get Azure FQDN (DNS Name) by Public IP Address

To get the FQDN for the VM I can do it with -VMName like:要获取 VM 的 FQDN,我可以使用 -VMName 来实现,例如:

$vm = Get-AzVM -VMName "name"
$pubip = Get-AzPublicIpAddress -ResourceGroupName $vm.ResourceGroupName | where{$_.Id -match $vm.Name}

$pubip.DnsSettings.Fqdn

But I want to do this with the local IP like (so no manual input neccessary):但我想用本地 IP 来做到这一点(所以不需要手动输入):

$vm = Get-AzVM -IP "20.X.X.15"

AFAIK, We can not use IP address directly to get the FQDN of Azure Vm, Firstly we need to retrieve the PublicIP address then after we can get the FQDN of the VM .据我所知,我们不能IP address directly来获取 Azure Vm 的 FQDN,首先我们需要检索PublicIP address ,然后才能获取 VM 的 FQDN

As you are using the correct command above:-当您使用上面的正确命令时:-

在此处输入图像描述

For more information please refer this Blog and as suggested @ Ken W MSFT in comment.有关更多信息,请参阅此博客,并按照@Ken W MSFT的建议在评论中发表评论。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure Powershell (Az模块) 公开IP地址 - Azure Powershell (Az module) get public IP address AWS中如何让新主机继承私有dns域名自动形成FQDN? - How can I get new hosts to inherit the private dns domain name to automatically form an FQDN in AWS? terraform azure 公共 ip 和公共 ip 前缀 - terraform azure public ip and public ip prefix VPC 对等 - DNS 解析为公共 IP - VPC Peering - DNS resolves to public IP 数据融合公共IP地址 - Data Fusion Public IP Address Azure 门户 IP 配置无法修改 VM 的 DNS 名称 - Azure Portal IP-configuration cannot modify DNS-Name of a VM 有没有办法为 Azure 数据工厂获取 static ip 地址 - Is there a way to get static ip address for Azure Data Factory GCP:在应用 DNS 出站转发策略后,无法让 Compute Engine VM 联系特定的公共 DNS 名称服务器 - GCP: Can't get Compute Engine VMs to contact a specific public DNS name server after applying a DNS outbound forwarding policy 查找unassociate public IP Azure - Find unassociate public IP Azure 找不到使用公共 IP 地址在 Fargate 中运行的任务 - Task running in Fargate is not found with public IP address
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM