Windows 2022
Sponsored Link

DNS Server : Add A/PTR record2021/12/23

 
Add A/PTR record.
On CUI configuration, Run PowerShell with Admin Privilege and Configure like follows.
[1] For example, Add A/PTR record with settings of hostname [rx-8], IP address [10.0.0.102] into a Zone [srv.world].
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# for [-TimeToLive], set TTL value (if not specified, default [1:00:00] is set(an hour))
PS C:\Users\Administrator> Add-DnsServerResourceRecordA -Name "rx-8" -ZoneName "srv.world" -IPv4Address "10.0.0.102" -TimeToLive 01:00:00 -CreatePtr -PassThru 

HostName                  RecordType Type       Timestamp            TimeToLive      RecordData
--------                  ---------- ----       ---------            ----------      ----------
rx-8                      A          1          0                    01:00:00        10.0.0.102

PS C:\Users\Administrator> Get-DnsServerResourceRecord -ZoneName "srv.world" | Format-Table -AutoSize -Wrap 

# [rx-8] has beed added
HostName RecordType Type Timestamp TimeToLive RecordData
-------- ---------- ---- --------- ---------- ----------
@        NS         2    0         01:00:00   rx-7.srv.world.
@        SOA        6    0         01:00:00   [2][rx-7.srv.world.][hostmaster.srv.world.]
rx-7     A          1    0         01:00:00   10.0.0.101
rx-8     A          1    0         01:00:00   10.0.0.102

# if remove it, run like follows
PS C:\Users\Administrator> Remove-DnsServerResourceRecord -ZoneName "srv.world" -RRType "A" -Name "rx-8" -RecordData "10.0.0.102" -PassThru 

Confirm
Removing DNS resource record rx-8 of type A from zone srv.world on RX-7 server. Do you want to continue?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y

HostName                  RecordType Type       Timestamp            TimeToLive      RecordData
--------                  ---------- ----       ---------            ----------      ----------
rx-8                      A          1          0                    01:00:00        10.0.0.102
DNS Server : Add A/PTR record (GUI)
 
On GUI configuration, set like follows.
[2] Run Server Manager and select [Tools] - [DNS], next right-click the own domain name to show menu on the left pane, then select [New Host(A or AAA)...].
[3] Input Hostname and IP address you'd like to add.
Furthermore, check a box [Create associated pointer (PTR) record].
[4] A new A/PTR record has beed just added.
Matched Content