PowerShell DNS Commands:Add-DnsServerResourceRecordCName
PowerShell DNS Commands » Add-DnsServerResourceRecordCName

Add-DnsServerResourceRecordCName

DNS Cmdlet: Add-DnsServerResourceRecordCName

Syntax:

Add-DnsServerResourceRecordCName [-HostNameAlias] <String>[-AllowUpdateAny][-Name] <String>[-ComputerName <String>] [-TimeToLive <TimeSpan>][-ZoneName] <String> [-AgeRecord] [-PassThru] [-ZoneScope <String>][-VirtualizationInstance <String>][-CimSession <CimSession[]>] [-ThrottleLimit <Int32>][-AsJob][-WhatIf][-Confirm][<CommonParameters>]

Parameters and Description:

Parameters Description
HostNameAlias (Type: String) Denotes the FQDN of the host that gets the alias i.e. the host's canonical name.time.
AllowUpdateAny (Type: SwitchParameter) Specifies that the authenticated users can update resource records of the same owner name.
ComputerName (Type: String) Enter the IP address, FQDN, NETBIOS name, or host name of the DNS server.
TimeToLive (Type: TimeSpan) Specifies the Time To Live (TTL) value in seconds for a given resource record.
AgeRecord (Type: SwitchParameter) Represents that a time stamp is used by the DNS server for the resource record that this cmdlet adds.
CimSession (Type: CimSession [] ) Runs the cmdlet on a remote computer or session. By default, it is run in the current session on the local computer.
ThrottleLimit (Type: Int32) Specifies the maximum number of concurrent operations that can allowed to run this cmdlet. If its value is 0 or not specified, PowerShell will automatically calculate the right throttle limit.

For more information on this cmdlet, please refer to this article.

Purpose of this cmdlet:

The Add-DnsServerResourceRecordCName cmdlet lets you add a CNAME (Canonical Name) resource record to a specific DNS zone. The CNAME record enables you to use multiple resource records to refer to a single host.

Example:

Add-DnsServerResourceRecordCName -Name "testserver1" -HostNameAlias
"srv1.lab.abc.com" -ZoneName "abc.com"

The above command adds a canonical name resource record with the alias testserver1 to the abc.com domain for the server1 system in lab.abc.com zone.

Did you know that ADManager Plus can help you:

  • Create user attributes in bulk, using CSV
  • Bulk create, enable, disable computers, etc.
  • Create, move, delete, or modify groups and group membership, and more in mass, at once.

Try out the powerful features of ADManager Plus by downloading the product for a free 30-day trial!

Active Directory Management and Reporting Solution

ADManager Plus is a web-based tool which offers the capability to manage Active Directory attributes in bulk easily using CSV files or templates. Get built-in reports on users and export them in CSV, PDF, HTML and XLSX formats.

Unravel end-to-end Active Directory management with ADManager Plus

  •  
  •  
  •  
  • By clicking 'Schedule a personalized demo' you agree to processing of personal data according to the Privacy Policy.
AD User Management / Reports
Active Directory Reporting
Active Directory Management
Related Products