Add-DnsServerResourceRecord

Verb: AddChapter 11: DNS records and zones

Creates a DNS resource record on a DNS server.

Syntax

Short syntax for this command. The parameter table below may list more parameters than this short line shows.

Syntax
Add-DnsServerResourceRecord -ZoneName <Zone> -A -Name <Host> -IPv4Address <Address>

Parameters

Note: the short syntax shows -A, which has no matching row in this table. That gap is reported, not filled in, so no description is invented here.

ParameterWhat it doesIn short syntax
-ZoneNamethe zoneYes
-Namethe host nameYes
-IPv4Addressthe address for an A recordYes

Examples

Creates an A record for srv1.

Example 1
Add-DnsServerResourceRecord -ZoneName "example.local" -A -Name "srv1" -IPv4Address "192.168.1.10"

Illustrative output: see the lesson example for this command.

Common mistakes

General cautions for this command.

  • Guessing parameters instead of checking Get-Help for this command.
  • Running a changing form of this command before previewing its effect.

Related commands

Commands that share this command's lesson come first, then commands that share its verb. Every link goes to a real command page.

Related lessons