Edit

Share via


Add-DAClientDnsConfiguration

Adds the specified DNS suffix, DNS server addresses, or proxy server set to the Name Resolution Policy Table (NRPT).

Syntax

Default (Default)

Add-DAClientDnsConfiguration
    [[-DnsIPAddress] <String[]>]
    [-DnsSuffix] <String>
    [-ProxyServer <String>]
    [-ComputerName <String>]
    [-PassThru]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Add-DAClientDNSConfiguration cmdlet adds the specified DNS suffix, DNS server addresses, or proxy server set to the Name Resolution Policy Table (NRPT). When a DNS suffix is specified, but no servers are specified, it is treated as a NRPT exemption entry.

In a multi-domain deployment, when an NRPT entry that consists of DNS suffix, proxy server and DNS IP addresses is added to the NRPT table the settings are added to all the DirectAccess (DA) client Group Policy Objects (GPOs) in different domains. In multi-site deployment with firstref_client_7 clients, the added entries are added to both the Windows® 8 client GPOs and Windows® 7 client GPOs.

The NRPT configuration is applicable globally, to the entire DA deployment and therefore is not impacted by multi-site deployment.

Examples

EXAMPLE 1

PS C:\> Add-DAClientDNSConfiguration -DnsSuffix contoso.com -DnsIPAddress 2006:2005:1::2 -PassThru
Comment                          :
DirectAccessDnsServers           : {2006:2005:1::2}
DirectAccessEnabled              : True
DirectAccessProxyName            :
DirectAccessProxyType            : Direct
DirectAccessQueryIPsecEncryption : None
DirectAccessQueryIPsecRequired   : False
DisplayName                      :
DnsSecEnabled                    :
DnsSecQueryIPsecEncryption       : None
DnsSecQueryIPsecRequired         : False
DnsSecValidationRequired         : False
IPsecCARestriction               :
Name                             : DA-{64329e4f-bd27-4d27-9553-6ed6880fa2a5}
NameEncoding                     :
NameServers                      :
Namespace                        : {contoso.com}
Version                          : 1

This example will add an entry for contoso.com into the NRPT which will result in all the DNS queries for the suffix contoso.com to be sent to 2006:2005:1::2 server.

EXAMPLE 2

PS C:\>Add-DAClientDNSConfiguration -DnsSuffix corp.contoso.com -PassThru
Comment                          :
DirectAccessDnsServers           :
DirectAccessEnabled              : True
DirectAccessProxyName            :
DirectAccessProxyType            : Direct
DirectAccessQueryIPsecEncryption : None
DirectAccessQueryIPsecRequired   : False
DisplayName                      :
DnsSecEnabled                    :
DnsSecQueryIPsecEncryption       : None
DnsSecQueryIPsecRequired         : False
DnsSecValidationRequired         : False
IPsecCARestriction               :
Name                             : DA-{2cc7ec6f-9f80-4190-95cd-b9ee9cbd11a6}
NameEncoding                     :
NameServers                      :
Namespace                        : {corp.contoso.com}
Version                          : 1

This example will add an exempt entry for corp.contoso.com in the NRPT which will result in DNS queries for the suffix corp.contoso.com to not go to a DNS server in the corporate network for resolution.

There are some names that need to be treated differently from all others with regards to name resolution; these names must not be resolved using intranet DNS servers. To ensure that these names are resolved with interface-configured DNS servers, these must added as NRPT exemptions.

There are several names that should be included on the exemption list - but the most important one is the name of the Network Location Server. This prevents the DA client from being able to connect to the NLS server when the server is off network and therefore prevents it from mistakenly thinking that it is on the corporate network.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComputerName

Specifies the IPv4 or IPv6 address, or host name, of the computer on which the Remote Access server computer specific tasks should be run.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Cn

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DnsIPAddress

Specifies the IPv4 or IPv6 address of the corresponding DNS servers that should be used for the specified DNS suffix. This parameter can be used with the DnsSuffix parameter.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:DirectAccessDnsServers

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DnsSuffix

Specifies a single DNS suffix.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Namespace

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProxyServer

Specifies the IPv4 or IPv6 address, or host name, of the proxy server configured for web traffic. The proxy server is specified in either the \<Proxy_Hostname\>:\<port\> or the \<Proxy_IPAddress\>:\<port\> format.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DirectAccessProxyName

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-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.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

String

Outputs

CimInstance

CimInstance

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

The DnsClientNRPTRule object consists of the following properties:

-- The NRPT object for the NRPT entry that was added.