Add-AzPrivateDnsRecordConfig

  Az.PrivateDns
Module Version:

1.0.2

NAME:
Add-AzPrivateDnsRecordConfig
DESCRIPTION:

The Add-AzPrivateDnsRecordConfig cmdlet adds a Private Domain Name System (DNS) record to a RecordSet object. The RecordSet object is an offline object, and
changes to it do not change the Private DNS responses until after you run the Set-AzPrivateDnsRecordSet cmdlet to persist the change to the Microsoft Azure
Private DNS service. SOA records are created when a Private DNS zone is created, and are removed when the Private DNS zone is deleted. You cannot add or remove
SOA records, but you can edit them. You can pass the RecordSet object to this cmdlet as a parameter or by using the pipeline operator.

EXAMPLES:

 ---------- Example 1: Add an A record to a record set ----------
 
  $RecordSet = Get-AzPrivateDnsRecordSet -Name www -RecordType A -ResourceGroupName MyResourceGroup -ZoneName myzone.com
  Add-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 1.2.3.4
  Set-AzPrivateDnsRecordSet -RecordSet $RecordSet
 
 # You can also pipe the above sequence:
 
  Get-AzPrivateDnsRecordSet -Name www -RecordType A -ResourceGroupName MyResourceGroup -ZoneName myzone.com | Add-AzPrivateDnsRecordConfig -Ipv4Address 
 1.2.3.4 | Set-AzPrivateDnsRecordSet
 
 Id                : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
                     oft.Network/privateDnsZones/myzone.com/A/www
 Name              : www
 ZoneName          : myzone.com
 ResourceGroupName : MyResourceGroup
 Ttl               : 3600
 Etag              : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
 RecordType        : A
 Records           : {1.2.3.4}
 Metadata          :
 IsAutoRegistered  :
 
 This example adds an A record to an existing record set.
 
 
 -------- Example 2: Add an AAAA record to a record set --------
 
  $RecordSet = Get-AzPrivateDnsRecordSet -Name www -RecordType AAAAA -ResourceGroupName MyResourceGroup -ZoneName myzone.com
  Add-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Ipv6Address 2001:DB80:4009:1803::1005
  Set-AzPrivateDnsRecordSet -RecordSet $RecordSet
 
 # You can also pipe the above sequence:
 
  Get-AzPrivateDnsRecordSet -Name www -RecordType AAAAA -ResourceGroupName MyResourceGroup -ZoneName myzone.com | Add-AzPrivateDnsRecordConfig -Ipv6Address 
 2001:DB80:4009:1803::1005 | Set-AzPrivateDnsRecordSet
 
 Id                : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
                     oft.Network/privateDnsZones/myzone.com/AAAA/www
 Name              : www
 ZoneName          : myzone.com
 ResourceGroupName : MyResourceGroup
 Ttl               : 3600
 Etag              : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
 RecordType        : AAAA
 Records           : {2001:DB80:4009:1803::1005}
 Metadata          :
 IsAutoRegistered  :
 
 This example adds an AAAAA record to an existing record set.
 
 
 -------- Example 3: Add a CNAME record to a record set --------
 
  $RecordSet = Get-AzPrivateDnsRecordSet -Name www -RecordType CNAME -ResourceGroupName MyResourceGroup -ZoneName myzone.com
  Add-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Cname contoso.com
  Set-AzPrivateDnsRecordSet -RecordSet $RecordSet
 
 # You can also pipe the above sequence:
 
  Get-AzPrivateDnsRecordSet -Name www -RecordType CNAME -ResourceGroupName MyResourceGroup -ZoneName myzone.com | Add-AzPrivateDnsRecordConfig -Cname 
 contoso.com | Set-AzPrivateDnsRecordSet
 
 Id                : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
                     oft.Network/privateDnsZones/myzone.com/CNAME/www
 Name              : www
 ZoneName          : myzone.com
 ResourceGroupName : MyResourceGroup
 Ttl               : 3600
 Etag              : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
 RecordType        : CNAME
 Records           : {www.contoso.com}
 Metadata          :
 IsAutoRegistered  :
 
 This example adds a CNAME record to an existing record set.
 
 
 ---------- Example 4: Add a MX record to a record set ----------
 
  $RecordSet = Get-AzPrivateDnsRecordSet -Name @ -RecordType MX -ResourceGroupName MyResourceGroup -ZoneName myzone.com
  Add-AzPrivateDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 -RecordSet $RecordSet
  Set-AzPrivateDnsRecordSet -RecordSet $RecordSet
 
 # You can also pipe the above sequence:
 
  Get-AzPrivateDnsRecordSet -Name "@" -RecordType MX -ResourceGroupName MyResourceGroup -ZoneName myzone.com | Add-AzPrivateDnsRecordConfig -Exchange 
 mail.microsoft.com -Preference 5 | Set-AzPrivateDnsRecordSet
 
 Id                : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
                     oft.Network/privateDnsZones/myzone.com/MX/www
 Name              : www
 ZoneName          : myzone.com
 ResourceGroupName : MyResourceGroup
 Ttl               : 3600
 Etag              : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
 RecordType        : MX
 Records           : {[5,mail.microsoft.com]}
 Metadata          :
 IsAutoRegistered  :
 
 This example adds a MX record to an existing record set.
 
 
 --------- Example 5: Add a PTR record to a record set ---------
 
  $RecordSet = Get-AzPrivateDnsRecordSet -Name 4 -RecordType PTR -ResourceGroupName MyResourceGroup -ZoneName 3.2.1.in-addr.arpa
  Add-AzPrivateDnsRecordConfig -Ptrdname www.contoso.com -RecordSet $RecordSet
  Set-AzPrivateDnsRecordSet -RecordSet $RecordSet
 
 # You can also pipe the above sequence:
 
  Get-AzPrivateDnsRecordSet -Name 4 -RecordType PTR -ResourceGroupName MyResourceGroup -ZoneName 3.2.1.in-addr.arpa | Add-AzPrivateDnsRecordConfig 
 -Ptrdname www.contoso.com | Set-AzPrivateDnsRecordSet
 
 Id                : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
                     oft.Network/privateDnsZones/3.2.1.in-addr.arpa/PTR/4
 Name              : 4
 ZoneName          : 3.2.1.in-addr.arpa
 ResourceGroupName : MyResourceGroup
 Ttl               : 3600
 Etag              : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
 RecordType        : PTR
 Records           : {www.contoso.com}
 Metadata          :
 IsAutoRegistered  :
 
 This example adds a PTR record to an existing record set.
 
 
 --------- Example 6: Add a SRV record to a record set ---------
 
  $RecordSet = Get-AzPrivateDnsRecordSet -Name _sip._tcp -RecordType SRV -ResourceGroupName MyResourceGroup-ZoneName myzone.com
  Add-AzPrivateDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target target.example.com
  Set-AzPrivateDnsRecordSet -RecordSet $RecordSet
 
 # You can also pipe the above sequence:
 
  Get-AzPrivateDnsRecordSet -Name _sip._tcp -RecordType SRV -ResourceGroupName MyResourceGroup -ZoneName myzone.com | Add-AzPrivateDnsRecordConfig 
 -Priority 0 -Weight 5 -Port 8080 -Target target.example.com | Set-AzPrivateDnsRecordSet
 
 Id                : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
                     oft.Network/privateDnsZones/myzone.com/SRV/_sip._tcp
 Name              : _sip._tcp
 ZoneName          : myzone.com
 ResourceGroupName : MyResourceGroup
 Ttl               : 3600
 Etag              : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
 RecordType        : SRV
 Records           : {[0,5,8080,sipservice.contoso.com]}
 Metadata          :
 IsAutoRegistered  :
 
 This example adds a SRV record to an existing record set.
 
 
 --------- Example 7: Add a TXT record to a record set ---------
 
  $RecordSet = Get-AzPrivateDnsRecordSet -Name text -RecordType TXT -ResourceGroupName MyResourceGroup -ZoneName myzone.com
  Add-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Value "This is a TXT Record"
  Set-AzPrivateDnsRecordSet -RecordSet $RecordSet
 
 # You can also pipe the above sequence:
 
  Get-AzPrivateDnsRecordSet -Name text -RecordType TXT -ResourceGroupName MyResourceGroup -ZoneName myzone.com | Add-AzPrivateDnsRecordConfig -Value "This 
 is a TXT Record" | Set-AzPrivateDnsRecordSet
 
 Id                : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
                     oft.Network/privateDnsZones/myzone.com/TXT/text
 Name              : text
 ZoneName          : myzone.com
 ResourceGroupName : MyResourceGroup
 Ttl               : 3600
 Etag              : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
 RecordType        : TXT
 Records           : {This is a TXT Record}
 Metadata          :
 IsAutoRegistered  :
 
 This example adds a TXT record to an existing record set.
 
 
 
 
 
 

SYNTAX:

 Add-AzPrivateDnsRecordConfig -Cname  -DefaultProfile  
 -RecordSet  
 
 Add-AzPrivateDnsRecordConfig -DefaultProfile  -Exchange 
  -Preference  -RecordSet  
 
 Add-AzPrivateDnsRecordConfig -DefaultProfile  -Ipv4Address 
  -RecordSet  
 
 Add-AzPrivateDnsRecordConfig -DefaultProfile  -Ipv6Address 
  -RecordSet  
 
 Add-AzPrivateDnsRecordConfig -DefaultProfile  -Port  
 -Priority  -RecordSet  -Target  -Weight  
 
 
 Add-AzPrivateDnsRecordConfig -DefaultProfile  -Ptrdname 
  -RecordSet  
 
 Add-AzPrivateDnsRecordConfig -DefaultProfile  -RecordSet 
  -Value  
 
 
 
 
 

SYNOPSIS:
Adds a Private DNS record to a local record set object.
INPUTS:

Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet

OUTPUTS:

Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet

PARAMETERS:

-Cname
The canonical name for the CNAME record to add. Must not be relative to the name of the zone. Must not have a terminating dot

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-Exchange
The mail exchange host for the MX record to add. Must not be relative to the name of the zone. Must not have a terminating dot

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-Ipv4Address
The IPv4 address for the A record to add.

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-Ipv6Address
The IPv6 address for the AAAA record to add.

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-Port
The port number for the SRV record to add.

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-Preference
The preference value for the MX record to add.

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-Priority
The priority value SRV record to add.

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-Ptrdname
The target host for the PTR record to add. Must not be relative to the name of the zone. Must not have a terminating dot

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-RecordSet
The record set in which to add the record.

Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false

-Target
The target host for the SRV record to add. Must not be relative to the name of the zone. Must not have a terminating dot

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-Value
The text value for the TXT record to add.

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false

-Weight
The weight value for the SRV record to add.

Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

LEAVE A COMMENT