Du kannst DNS-Einträge mithilfe von PowerShell mit dem Modul DnsClient verwalten. Hier sind Beispiele, wie du Einträge der verschiedenen Typen erstellen kannst.
A (IPv4)
$IPAddress = "192.168.1.100"
$HostName = "example.com"
Add-DnsServerResourceRecordA -Name $HostName -IPv4Address $IPAddress -ZoneName "example.com"
AAAA (IPv6)
$IPv6Address = "2001:db8::1"
$HostName = "example.com"
Add-DnsServerResourceRecordAAAA -Name $HostName -IPv6Address $IPv6Address -ZoneName "example.com"
CNAME (Common Name)
$AliasName = "www"
$TargetHost = "example.com"
Add-DnsServerResourceRecordCName -Name $AliasName -HostNameAlias $TargetHost -ZoneName "example.com"
MX (Mail Exchange)
$MailServer = "mail.example.com"
$Preference = 10
Add-DnsServerResourceRecordMX -Name "example.com" -MailExchange $MailServer -Preference $Preference -ZoneName "example.com"
TXT
$TextData = "This is a TXT record."
Add-DnsServerResourceRecordTxt -Name "example.com" -Text $TextData -ZoneName "example.com"