Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers  Aliases  Modules
 

Add-DnsClientNrptRule

Add-DnsClientNrptRule

DnsClient

Synopsis

Adds a rule to the NRPT.

Syntax

Add-DnsClientNrptRule [-Namespace] [-CimSession] [-Comment] [-DAEnable] [-DAIPsecEncryptionType] [-DAIPsecRequired] [-DANameServers] [-DAProxyServerName] [-DAProxyType] [-DisplayName] [-DnsSecEnable] [-DnsSecIPsecEncryptionType] [-DnsSecIPsecRequired] [-DnsSecValidationRequired] [-GpoName] [-IPsecTrustAuthority] [-NameEncoding] [-NameServers] [-PassThru] [-Server] [-ThrottleLimit] [-Confirm] [-WhatIf] [<CommonParameters>]

Detailed Description

The Add-DnsClientNrptRule cmdlet adds a Name Resolution Policy Table (NRPT) rule for the specified namespace.

Parameters

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

Aliases

Session

Required?

false

Position

named

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-Comment <String>

Stores administrator notes.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DAEnable <SwitchParameter>

Indicates the rule state for DirectAccess.

Aliases

DirectAccessEnabled

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DAIPsecEncryptionType <String>

Specifies the Internet Protocol security (IPsec) encryption setting for DirectAccess. The acceptable values for this parameter are: -- None -- Low -- Medium -- High

Aliases

DirectAccessQueryIPSSECEncryption

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DAIPsecRequired <SwitchParameter>

Indicates that IPsec is required for DirectAccess.

Aliases

DirectAccessQueryIPsecRequired

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DANameServers <String[]>

Specifies an array of DNS servers to query when DirectAccess is enabled.

Aliases

DirectAccessDnsServers

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DAProxyServerName <String>

Specifies the proxy server to use when connecting to the Internet. This parameter is only applicable if the DAProxyType parameter is set to UseProxyName.

Acceptable formats are: -- hostname:port -- IPv4 address:port -- IPv6 address:port

Aliases

DirectAccessProxyName

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DAProxyType <String>

Specifies the proxy server type to be used when connecting to the Internet. The acceptable values for this parameter are: -- NoProxy -- UseDefault -- UseProxyName

Aliases

DirectAccessProxyType

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DisplayName <String>

Specifies an optional friendly name for the NRPT rule.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DnsSecEnable <SwitchParameter>

Enables Domain Name System Security Extensions (DNSSEC) on the rule.

Aliases

DnsSecEnabled

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DnsSecIPsecEncryptionType <String>

Specifies the IPsec tunnel encryption settings.

Aliases

DnsSecQueryIPsecEncryption

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DnsSecIPsecRequired <SwitchParameter>

Indicates the DNS client must set up an IPsec connection to the DNS server.

Aliases

DnsSecQueryIPsecRequired

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DnsSecValidationRequired <SwitchParameter>

Indicates that DNSSEC validation is required.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-GpoName <String>

Specifies the name of the Group Policy Object (GPO). -- If this parameter and the Server parameter are specified, then the NRPT rule is added in the GPO of domain. The Server parameter specifies the domain controller (DC). -- If neither this parameter nor the Server parameter is specified, then the NRPT rule is added for local client computer. -- If this parameter is specified and the Server parameter is not specified, then the DC of the domain specified by this parameter value is found and NRPT rule is added to the GPO. -- If this parameter is not specified and the Server parameter is specified, then an error is displayed.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-IPsecTrustAuthority <String>

Specifies the certification authority to validate the IPsec channel.

Aliases

IPsecCARestriction

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-NameEncoding <String>

Specifies the encoding format for host names in the DNS query. The acceptable values for this parameter are: -- Disable -- Utf8WithMapping -- Utf8WithoutMapping -- Punycode

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-NameServers <String[]>

Specifies the DNS servers to which the DNS query is sent when DirectAccess is disabled.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Namespace <String[]>

Specifies the DNS namespace.

Aliases

none

Required?

true

Position

2

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

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

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-Server <String>

Specifies the server hosting the GPO. This parameter is only applicable with the GpoName parameter.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ThrottleLimit <Int32>

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.

Aliases

none

Required?

false

Position

named

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-Confirm <SwitchParameter>

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

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

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/DNS/DnsClientNrptRule

Return Type

Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/DNS/DnsClientNrptRule

Notes

None

Examples

Example 1: Add an NRPT rule to a GPO

This command adds an NRPT rule in TestGPO on server host1.com for the namespace dnsnrpt.com.

PS C:\>Add-DnsClientNrptRule -GpoName "TestGPO" -DANameServers "10.0.0.1" -DAIPsecRequired -DAIPsecEncryptionType "High" -DAProxyServerName "DaServer.com:6666" -DnsSecEnable -PassThru -DAProxyType "UseProxyName" -DnsSecValidationRequired -DAEnable -IPsecTrustAuthority "RootCA" -Comment "Sample NRPT Rule" -DisplayName "Sample" -DnsSecIPsecRequired -DnsSecIPsecEncryptionType "Medium" -NameServers "10.0.0.1" -NameEncoding "Punycode" -Namespace "dnsnrpt.com" -Server "host1.com"

Example 2: Add an NRPT rule to configure a server

This command adds an NRPT rule that configures the server named 10.0.0.1 as a DNS server for the namespace pqr.com.

PS C:\>Add-DnsClientNrptRule -Namespace "pqr.com" -NameServers "10.0.0.1"

Example 3: Add an NRPT rule to enable DNSSEC queries

This command adds an NRPT rule that enables DNSSEC queries to be sent for the namespace pqr.com.

PS C:\>Add-DnsClientNrptRule -Namespace "pqr.com" -DnsSecEnable

Example 4: Add an NRPT rule to enable DNSSEC queries for a specified namespace

This command adds an NRPT rule that enables DNSSEC queries to be sent to DNS server named 10.0.0.1 for the namespace pqr.com.

PS C:\>Add-DnsClientNrptRule -Namespace "pqr.com" -DnsSecEnable -NameServers "10.0.0.1"

Example 5: Add an NRPT rule to send Punycode DNS queries

This command adds an NRPT rule that sends DNS queries encoded in Punycode to DNS server named 10.1.1.1 for the namespace pqr.com.

PS C:\>Add-DnsClientNrptRule -Namespace "pqr.com" -NameEncoding "Punycode" -NameServers "10.1.1.1" -PassThru
Name                             : {6a78d8d1-231d-4d1e-bc23-fb593e11a53d} 
Version                          : 2 
Namespace                        : {pqr.com} 
IPsecCARestriction               : 
DirectAccessDnsServers           : 
DirectAccessEnabled              : False 
DirectAccessProxyType            : 
DirectAccessProxyName            : 
DirectAccessQueryIPsecEncryption : 
DirectAccessQueryIPsecRequired   : 
NameServers                      : 10.1.1.1 
DnsSecEnabled                    : False 
DnsSecQueryIPsecEncryption       : 
DnsSecQueryIPsecRequired         : 
DnsSecValidationRequired         : 
NameEncoding                     : Punycode 
DisplayName                      : 
Comment                          : 

Online Version
Get-DnsClientNrptGlobal
Get-DnsClientNrptPolicy
Get-DnsClientNrptRule
Remove-DnsClientNrptRule
Set-DnsClientNrptGlobal
Set-DnsClientNrptRule