COMMAND EVERYTHING.
Adds a resource record of a specified type to a specified DNS zone.
Microsoft DnsServer reference: Adds a resource record of a specified type to a specified DNS zone. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Add-DnsServerResourceRecord. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Windows / DnsServer · Windows Server 2025 documentation; feature/module prerequisites apply
-A (required)- Indicates that the record that this cmdlet adds to the DNS server is a host address (A) resource record. An A resource record maps a host name to an IPv4 address.
-AAAA (required)- Indicates that the record that this cmdlet adds to the DNS server is an AAAA resource record. An AAAA resource record maps a host name to an IPv6 address.
-Address (required)- Specifies a byte array that contains the asynchronous transfer mode (ATM) address of the owner to which this resource record object pertains. The *AddressType* parameter specifies the format of the byte array. The first 4 bytes of the array store the size of the octet string. The most significant byte is byte 0.
-AddressType (required)- Specifies the format of an ATM address in an ATM address (ATMA) resource record. Valid values are: 0, for an ATM End System Address (AESA) format, and 1, for an E.164 address format.
-Afsdb (required)- Indicates that the record that this cmdlet adds to the DNS server is an Andrew File System cell database server (AFSDB) resource record. An AFSDB resource record gives the location of the AFS cell database server and uses DNS to map a DNS domain name to the name of an AFS cell database server.
-AgeRecord- Indicates that the DNS server uses a time stamp for the resource record that this cmdlet adds. A DNS server can scavenge resource records that have become stale based on a time stamp.
-AllowUpdateAny- Indicates that any authenticated user can update a resource record that has the same owner name.
-AsJob- Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell background jobs, see about_Jobs.
-Atma (required)- Indicates that the record that this cmdlet adds to the DNS server is an ATM address resource record.
-CName (required)- Indicates that the record that this cmdlet adds to the DNS server is a canonical name (CNAME) resource record.
-CacheTimeout (required)- Specifies how long, in seconds, that a DNS server caches a response from a WINS server.
-CertificateAssociationData (required)- Specifies the certificate association data for a Transport Layer Security (TLS) authentication record.
-CertificateUsage (required)- Specifies the certificate usage TLS authentication record.
-CimSession- Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
-ComputerName- Specifies a DNS server. If you do not specify this parameter, the command runs on the local system. You can specify an IP address or any value that resolves to an IP address, such as a fully qualified domain name (FQDN), host name, or NETBIOS name.
-Confirm- Prompts you for confirmation before running the cmdlet.
-Cpu (required)- Specifies the CPU type of a DNS server. You can find the CPU type in a host information (HINFO) resource record.
-CreatePtr- Indicates that the DNS server automatically creates an associated pointer (PTR) resource record for an A or AAAA record. A PTR resource record maps an IP address to a host name.
-DName (required)- Indicates that the record that this cmdlet adds to the DNS server is a domain alias (DNAME) resource record on a DNS server. A DNAME resource record renames the root and all descendants in a domain namespace subtree and provides nonterminal domain name redirection.
-Description (required)- Specifies text to describe the person or people that are responsible for the domain.
-DescriptiveText (required)- Specifies additional text to describe a resource record on a DNS server. It is limited to 254 characters per line.
-DhcId (required)- Indicates that the record that this cmdlet adds to the DNS server is a Dynamic Host Configuration Protocol Information (DHCID) resource record.
-DhcpIdentifier (required)- Specifies a public key that is associated with an FQDN, as described in section 3 of RFC 2535.
-DomainName (required)- Specifies the name of a domain.
-DomainNameAlias (required)- Specifies the alias for a domain name.
-Force- Adds a resource record without prompting you for confirmation. By default, the cmdlet prompts you for confirmation before it proceeds.
-HInfo (required)- Indicates that the record that this cmdlet adds to the DNS server is a host information (HINFO) resource record on a DNS server.
-HostNameAlias (required)- Specifies a canonical name target for a CNAME record. This must be a fully qualified domain name (FQDN).
-IPv4Address (required)- Specifies the IPv4 address of a host.
-IPv6Address (required)- Specifies the IPv6 address of a host.
-InputObject (required)- Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.
-IntermediateHost (required)- Specifies the FQDN of a host that routes packets to a destination host.
-InternetAddress (required)- Specifies the IP address of the owner of a resource record.
-InternetProtocol (required)- Specifies the Internet Protocol (IP) for a resource record. Valid values are: UDP or TCP.
-Isdn (required)- Indicates that the record that this cmdlet adds to the DNS server is an Integrated Services Digital Network (ISDN) resource record.
-IsdnNumber (required)- Specifies the number in the ISDN address that maps to the FQDN of a DNS server. An ISDN address, which consists of a phone number and an optional subaddress, is located in an ISDN resource record. The phone number can contain a country/region code, an area code, and a local phone number.
-IsdnSubAddress (required)- Specifies the number that is contained in an ISDN address that maps to the FQDN of a DNS server. An ISDN address consists of a phone number and an optional subaddress and is located in an ISDN resource record. The subaddress is an identifier that describes the ISDN subaddress encoding type.
-LookupTimeout (required)- Specifies the lookup time-out value for a resource record.
-MX (required)- Indicates that the record that this cmdlet adds to the DNS server is a mail exchanger (MX) resource record.
-MailExchange (required)- Specifies the FQDN of the host that is acting as a mail exchanger for the owner.
-MatchingType (required)- Specifies the matching type for the record. The acceptable values for this parameter are: - ExactMatch - Sha256Hash - Sha512Hash
-NS (required)- Indicates that the record that this cmdlet adds to the DNS server is a Name Server (NS) resource record on a DNS server.
-Name (required)- Specifies the name of a DNS server resource record object.
-NameServer (required)- Specifies the name server of a domain.
-OperatingSystem (required)- Specifies the operating system identifier of a DNS server. You can find the operating system identifier in a HINFO resource record.
-PassThru- Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
-Port (required)- Specifies the port where the server listens for the service.
-Preference (required)- Specifies the priority for this resource record among other resource records that belong to the same owner, where a lower value has a higher priority.
-Priority (required)- Specifies the priority of a DNS server. Clients try to contact the server that has the lowest priority.
-PsdnAddress (required)- Specifies the public switched data network (PSDN) address of the owner of a resource record.
-Ptr (required)- Indicates that the record that this cmdlet adds to the DNS server is a PTR resource record.
-PtrDomainName (required)- Specifies the FQDN of the host when you add a PTR resource record.
-RP (required)- Indicates that the record that this cmdlet adds to the DNS server is a Responsible Person (RP) resource record.
-RT (required)- Indicates that the record that this cmdlet adds to the DNS server is a Route Through (RT) resource record.
-RecordData (required)- Specifies the data contained in the resource record you want to add.
-Replicate- Indicates that the DNS server allows WINS replication.
-ResponsiblePerson (required)- Specifies the FQDN for the domain mailbox name of the person who is responsible for the resource record. When used together with the MR parameter set, this value specifies a mailbox that is the proper rename of the mailbox that is specified in the resource record's owner name.
-ResultDomain (required)- Specifies the domain name to append to returned NetBIOS names.
-Selector (required)- Specifies a selector.
-ServerName (required)- Specifies the subtype of a host AFS server. For subtype 1 (value=1), the host has an AFS version 3.0 Volume Location Server for the named AFS cell. For subtype 2 (value=2), the host has an authenticated name server holding the cell-root directory node for the named DCE/NCA cell.
-Service (required)- Specifies the service or services that are available for the current rewrite path. It can also specify a particular protocol to use for a service. Available services include Well-known Service (WKS) and NAPTR.
-Srv (required)- Indicates that the record that this cmdlet adds to the DNS server is a Service (SRV) resource record.
-SubType (required)- Specifies whether the server is an AFS volume location server. Use a value of 1 indicate that the server is an AFS version 3.0 volume location server for the specified AFS cell. Use a value of 2 to indicate that the server is an authenticated name server that holds the cell-root directory node for the server that uses either Open Software Foundation's (OSF) DCE authenticated cell-naming system or HP/Apollo's Network Computing Architecture (NCA). For more information about server subtypes, see RFC 1183.
-TLSA (required)- Indicates that the record that this cmdlet adds is a TLS authentication resource record.
-ThrottleLimit- Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
-TimeToLive- Specifies the Time to Live (TTL) value, in seconds, for a resource record. Other DNS servers use this length of time to determine how long to cache a record.
-Txt (required)- Indicates that the record that this cmdlet adds to the DNS server is a TXT resource record.
-Type (required)- Specifies the type of the resource record.
-VirtualizationInstance- Specifies the virtualization instance in which the zone will be added. A virtualization instance is logical partition in a DNS Server, which is capable of independently hosting zones and zone scopes. Same name zones and zone scopes can be hosted in different virtualization instances. This parameter is optional and if not provided it will add the zone into the default virtualization instance which is functionally equivalent to a standard DNS server.
-Weight (required)- Specifies a value for the weight of the target host for a resource record. You can use this parameter when you have multiple hosts that have an identical priority. Use of the host is proportional to its weight.
-WhatIf- Shows what would happen if the cmdlet runs. The cmdlet is not run.
-Wins (required)- Indicates that the record that this cmdlet adds to the DNS server is a WINS resource record.
-WinsR (required)- Indicates that the record that this cmdlet adds to the DNS server is a WINS reverse (WinsR) resource record.
-WinsServers (required)- Specifies one or more IP addresses of WINS servers that you want to use for a resource record.
-Wks (required)- Indicates that the record that this cmdlet adds to the DNS server is WKS resource record.
-X25 (required)- Indicates that the record that this cmdlet adds to the DNS server is an X25 resource record.
-ZoneName (required)- Specifies the name of a DNS zone.
-ZoneScope- Specifies the name of a zone scope.
Windows with the DnsServer module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.