你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzDnsForwardingRulesetForwardingRule

Gets properties of a forwarding rule in a DNS forwarding ruleset.

Syntax

Get-AzDnsForwardingRulesetForwardingRule
   -DnsForwardingRulesetName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-Top <Int32>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzDnsForwardingRulesetForwardingRule
   -DnsForwardingRulesetName <String>
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzDnsForwardingRulesetForwardingRule
   -InputObject <IDnsResolverIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

Gets properties of a forwarding rule in a DNS forwarding ruleset.

Examples

Example 1: List all forwarding rule under the resource

Get-AzDnsForwardingRulesetForwardingRule -DnsForwardingRulesetName DnsResolverName -ResourceGroupName sampleRG

Location Name                                                            Type                                                Etag
-------- ----                                                            ----                                                ----
westus2  dnsForwardingRule                                            Microsoft.Network/dnsForwardingRulesets/forwardingRule "04005592-0000-0800-0000-60e7ec170000"
westus2  pw-dnsForwardingRule                                         Microsoft.Network/dnsForwardingRulesets/forwardingRule "08009ec9-0000-0800-0000-60e383b70000"

This command gets all forwarding rule under the resource.

Example 1: Get forwarding rule by name

Get-AzDnsForwardingRulesetForwardingRule -DnsForwardingRulesetName DnsResolverName -ResourceGroupName sampleRG -Name forwardingRule

Location Name                                                            Type                                                Etag
-------- ----                                                            ----                                                ----
westus2  dnsForwardingRule                                            Microsoft.Network/dnsForwardingRulesets/forwardingRule "04005592-0000-0800-0000-60e7ec170000"

This command gets a forwarding rule by name.

Parameters

-DefaultProfile

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

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-DnsForwardingRulesetName

The name of the DNS forwarding ruleset.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IDnsResolverIdentity
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-Name

The name of the forwarding rule.

Type:String
Aliases:ForwardingRuleName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The ID of the target subscription.

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Accept pipeline input:False
Accept wildcard characters:False

-Top

The maximum number of results to return. If not specified, returns up to 100 results.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IDnsResolverIdentity

Outputs

IForwardingRule

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

INPUTOBJECT <IDnsResolverIdentity>: Identity Parameter

  • [DnsForwardingRulesetName <String>]: The name of the DNS forwarding ruleset.
  • [DnsResolverName <String>]: The name of the DNS resolver.
  • [ForwardingRuleName <String>]: The name of the forwarding rule.
  • [Id <String>]: Resource identity path
  • [InboundEndpointName <String>]: The name of the inbound endpoint for the DNS resolver.
  • [OutboundEndpointName <String>]: The name of the outbound endpoint for the DNS resolver.
  • [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
  • [SubscriptionId <String>]: The ID of the target subscription.
  • [VirtualNetworkLinkName <String>]: The name of the virtual network link.
  • [VirtualNetworkName <String>]: The name of the virtual network.