积极答复者
使用powerhsell管理dns服务器的问题

问题
答案
-
您好 ,
通过您的图片上看,您的server是08/08R2版本。Get-DnsServerResourceRecord这个命令适用于server2012以上的版本。
可以参考这篇文章:
Get-DnsServerResourceRecord
https://technet.microsoft.com/fr-fr/library/jj649863(v=wps.620).aspx
如果要在08/08R2上面用命令查看区域记录的话,请运行以下的命令,通用于08/08R2到2016的server所有版本(在CMD中以管理员身份运行):
dnscmd /enumrecords zone name @ /Type A
通配符@修改成想要的hostname,就可以得到对应的主机名的IP地址:
关于此命令的详细使用方法,可以参考以下的链接:
另外需要提及一点,在server2016中单独运行Get-DnsServerResourceRecord的命令会出现报错,是因为它一定要求输入zonename的必要参数。
而在server2012中,会直接提示输入zonename的参数,会有一些区别:
此致
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
- 已编辑 Candy LuoMicrosoft contingent staff, Moderator 2017年12月14日 9:00
- 已建议为答案 Candy LuoMicrosoft contingent staff, Moderator 2017年12月21日 9:12
- 已标记为答案 nelson2004 2019年2月13日 6:19
全部回复
-
您好 ,
>>Get-DnsServerResourceRecord这个命令找不到
请问是出现了什么报错信息呢?如果是在安装了DNS角色的服务上运行这个命令的话,请您在命令之后加上 zone name ,然后检查是否可以正常显示了。
>>如何使用powershell在dns服务器根据ip地址查找对应主机名?
在您创建有反向查找区域记录的情况下,运行nslookup IP就可以通过IP地址查找对应的主机名了。
powershell中也可以使用以下的命令进行查找:Resolve-Dnsname -name IP
此致
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已建议为答案 Candy LuoMicrosoft contingent staff, Moderator 2017年12月13日 3:11
-
您好 ,
有任何疑问,您都可以随时在贴下进行回复。
此致
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
您好 ,
目前问题有什么新的进展吗?
此致
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
您好 ,
通过您的图片上看,您的server是08/08R2版本。Get-DnsServerResourceRecord这个命令适用于server2012以上的版本。
可以参考这篇文章:
Get-DnsServerResourceRecord
https://technet.microsoft.com/fr-fr/library/jj649863(v=wps.620).aspx
如果要在08/08R2上面用命令查看区域记录的话,请运行以下的命令,通用于08/08R2到2016的server所有版本(在CMD中以管理员身份运行):
dnscmd /enumrecords zone name @ /Type A
通配符@修改成想要的hostname,就可以得到对应的主机名的IP地址:
关于此命令的详细使用方法,可以参考以下的链接:
另外需要提及一点,在server2016中单独运行Get-DnsServerResourceRecord的命令会出现报错,是因为它一定要求输入zonename的必要参数。
而在server2012中,会直接提示输入zonename的参数,会有一些区别:
此致
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
- 已编辑 Candy LuoMicrosoft contingent staff, Moderator 2017年12月14日 9:00
- 已建议为答案 Candy LuoMicrosoft contingent staff, Moderator 2017年12月21日 9:12
- 已标记为答案 nelson2004 2019年2月13日 6:19
-
您好 ,
如果有任何疑问,您可以随时在贴下进行回复。
感谢您的理解和支持。
此致
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.