< Back
Get-AzureRmDnsRecordSet
Post
NAME Get-AzureRmDnsRecordSet
SYNOPSIS
Gets a DNS record set.
SYNTAX
Get-AzureRmDnsRecordSet [-DefaultProfile <IAzureContextContainer>] [-Name <String>] [-RecordType {A | AAAA | CNAME | MX | NS | PTR | SOA | SRV |
TXT}] -ResourceGroupName <String> -ZoneName <String> [<CommonParameters>]
Get-AzureRmDnsRecordSet [-DefaultProfile <IAzureContextContainer>] [-Name <String>] [-RecordType {A | AAAA | CNAME | MX | NS | PTR | SOA | SRV |
TXT}] -Zone <DnsZone> [<CommonParameters>]
DESCRIPTION
The Get-AzureRmDnsRecordSet cmdlet gets the Domain Name System (DNS) record set with the specified name and type, in the specified zone.
If you do not specify the Name or RecordType parameters, this cmdlet returns all record sets of the specified type in the zone. If you specify the
RecordType parameter but not the Name parameter, this cmdlet returns all record sets of the specified record type.
You can use the pipeline operator to pass a DnsZone object to this cmdlet, or you can pass a DnsZone object as the Zone parameter, or
alternatively you can specify the zone and resource group by name.
PARAMETERS
-DefaultProfile <IAzureContextContainer>
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
-Name <String>
Specifies the name of the RecordSet to get. If you do not specify the Name parameter, all record sets of the specified type are returned.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RecordType <RecordType>
Specifies the type of DNS record that this cmdlet gets.
Valid values are:
- A
- AAAA
- CNAME
- MX
- NS
- PTR
- SOA
- SRV
- TXT
If you do not specify the RecordType parameter, you must also omit the Name parameter. This cmdlet then returns all record sets in the zone
(of all names and types).
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the resource group that contains the DNS zone. The zone name must also be specified, using the ZoneName parameter.
Alternatively, you can specify the zone and resource group by passing in a DnsZone object using the Zone parameter.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Zone <DnsZone>
Specifies the DNS zone that contains the record set that this cmdlet gets. Alternatively, you can specify the zone using the ZoneName and
ResourceGroupName parameters.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-ZoneName <String>
Specifies the name of the DNS zone that contains the record set to get. The resource group containing the zone must also be specified, using
the ResourceGroupName parameter.
Alternatively, you can specify the zone and resource group by passing in a DNS Zone object using the Zone parameter.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
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).
INPUTS
Microsoft.Azure.Commands.Dns.DnsZone
You can pipe a DnsZone object to this cmdlet. The DnsZone object represents the zone in which to look for the RecordSet object.
OUTPUTS
Microsoft.Azure.Commands.Dns.DnsRecordSet
This cmdlet returns one or more objects that represents the record sets that are found. There will be at most one RecordSet returned if the
Name and RecordType parameters are specified, otherwise multiple RecordSet objects are returned as an array.
NOTES
Example 1: Get record sets with a specified name and type
PS C:\\>$RecordSet = Get-AzureRmDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com" -Name "www" -RecordType A
This command gets the record set of record type A named www in the specified resource group and zone, and then stores it in the $RecordSet
variable. Because the Name and RecordType parameters are specified, only one RecordSet object is returned.
Example 2: Get record sets of a specified type
PS C:\\>$RecordSets = Get-AzureRmDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com" -RecordType A
This command gets an array of all record sets of record type A in the zone named myzone.com in the resource group named MyResourceGroup, and then
stores them in the $RecordSets variable.
Example 3: Get all record sets in a zone
PS C:\\>$RecordSets = Get-AzureRmDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com"
This command gets an array of all record sets in the zone named myzone.com in the resource group named MyResourceGroup, and then stores them in
the $RecordSets variable.
Example 4: Get all record sets in a zone, using a DnsZone object
PS C:\\> $Zone = Get-AzureRmDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"
PS C:\\> $RecordSets = Get-AzureRmDnsRecordSet -Zone $Zone
This example is equivalent to Example 3 above. This time, the zone is specified using a zone object.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... srecordset
New-AzureRmDnsRecordSet
Remove-AzureRmDnsRecordSet
Set-AzureRmDnsRecordSet
SYNOPSIS
Gets a DNS record set.
SYNTAX
Get-AzureRmDnsRecordSet [-DefaultProfile <IAzureContextContainer>] [-Name <String>] [-RecordType {A | AAAA | CNAME | MX | NS | PTR | SOA | SRV |
TXT}] -ResourceGroupName <String> -ZoneName <String> [<CommonParameters>]
Get-AzureRmDnsRecordSet [-DefaultProfile <IAzureContextContainer>] [-Name <String>] [-RecordType {A | AAAA | CNAME | MX | NS | PTR | SOA | SRV |
TXT}] -Zone <DnsZone> [<CommonParameters>]
DESCRIPTION
The Get-AzureRmDnsRecordSet cmdlet gets the Domain Name System (DNS) record set with the specified name and type, in the specified zone.
If you do not specify the Name or RecordType parameters, this cmdlet returns all record sets of the specified type in the zone. If you specify the
RecordType parameter but not the Name parameter, this cmdlet returns all record sets of the specified record type.
You can use the pipeline operator to pass a DnsZone object to this cmdlet, or you can pass a DnsZone object as the Zone parameter, or
alternatively you can specify the zone and resource group by name.
PARAMETERS
-DefaultProfile <IAzureContextContainer>
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
-Name <String>
Specifies the name of the RecordSet to get. If you do not specify the Name parameter, all record sets of the specified type are returned.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RecordType <RecordType>
Specifies the type of DNS record that this cmdlet gets.
Valid values are:
- A
- AAAA
- CNAME
- MX
- NS
- PTR
- SOA
- SRV
- TXT
If you do not specify the RecordType parameter, you must also omit the Name parameter. This cmdlet then returns all record sets in the zone
(of all names and types).
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the resource group that contains the DNS zone. The zone name must also be specified, using the ZoneName parameter.
Alternatively, you can specify the zone and resource group by passing in a DnsZone object using the Zone parameter.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Zone <DnsZone>
Specifies the DNS zone that contains the record set that this cmdlet gets. Alternatively, you can specify the zone using the ZoneName and
ResourceGroupName parameters.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-ZoneName <String>
Specifies the name of the DNS zone that contains the record set to get. The resource group containing the zone must also be specified, using
the ResourceGroupName parameter.
Alternatively, you can specify the zone and resource group by passing in a DNS Zone object using the Zone parameter.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
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).
INPUTS
Microsoft.Azure.Commands.Dns.DnsZone
You can pipe a DnsZone object to this cmdlet. The DnsZone object represents the zone in which to look for the RecordSet object.
OUTPUTS
Microsoft.Azure.Commands.Dns.DnsRecordSet
This cmdlet returns one or more objects that represents the record sets that are found. There will be at most one RecordSet returned if the
Name and RecordType parameters are specified, otherwise multiple RecordSet objects are returned as an array.
NOTES
Example 1: Get record sets with a specified name and type
PS C:\\>$RecordSet = Get-AzureRmDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com" -Name "www" -RecordType A
This command gets the record set of record type A named www in the specified resource group and zone, and then stores it in the $RecordSet
variable. Because the Name and RecordType parameters are specified, only one RecordSet object is returned.
Example 2: Get record sets of a specified type
PS C:\\>$RecordSets = Get-AzureRmDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com" -RecordType A
This command gets an array of all record sets of record type A in the zone named myzone.com in the resource group named MyResourceGroup, and then
stores them in the $RecordSets variable.
Example 3: Get all record sets in a zone
PS C:\\>$RecordSets = Get-AzureRmDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com"
This command gets an array of all record sets in the zone named myzone.com in the resource group named MyResourceGroup, and then stores them in
the $RecordSets variable.
Example 4: Get all record sets in a zone, using a DnsZone object
PS C:\\> $Zone = Get-AzureRmDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"
PS C:\\> $RecordSets = Get-AzureRmDnsRecordSet -Zone $Zone
This example is equivalent to Example 3 above. This time, the zone is specified using a zone object.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... srecordset
New-AzureRmDnsRecordSet
Remove-AzureRmDnsRecordSet
Set-AzureRmDnsRecordSet